source: rtems/contrib/crossrpms/cpukit/rpm-install.add @ 6cd53b2

4.9
Last change on this file since 6cd53b2 was 6cd53b2, checked in by Ralf Corsepius <ralf.corsepius@…>, on Feb 7, 2009 at 9:26:19 AM

Sync with CVS-HEAD.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1# Extract %%__os_install_post into os_install_post~
2cat << \EOF > os_install_post~
3%__os_install_post
4EOF
5
6# Generate customized brp-*scripts
7cat os_install_post~ | while read a x y; do
8case $a in
9# Prevent brp-strip* from trying to handle foreign binaries
10*/brp-strip*)
11  b=$(basename $a)
12  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
13  chmod a+x $b
14  ;;
15%if "%{_prefix}" != "/usr"
16# Fix up brp-compress to handle %%_prefix != /usr
17*/brp-compress*)
18  b=$(basename $a)
19  sed -e 's,\./usr/,.%{_prefix}/,g' < $a > $b
20  chmod a+x $b
21  ;;
22%endif
23esac
24done
25
26sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
27%if "%{_prefix}" != "/usr"
28  -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \
29%endif
30< os_install_post~ > os_install_post
31%define __os_install_post . ./os_install_post
32
33
34cat << EOF > %{_builddir}/%{name}-%{version}/find-provides
35#!/bin/sh
36grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/@tool_target@/(lib|include|sys-root)' \
37  | grep -v '^${RPM_BUILD_ROOT}%{cpukitlib}/@tool_target@/' | %__find_provides
38EOF
39chmod +x %{_builddir}/%{name}-%{version}/find-provides
40%define __find_provides %{_builddir}/%{name}-%{version}/find-provides
41
42cat << EOF > %{_builddir}/%{name}-%{version}/find-requires
43#!/bin/sh
44grep -E -v '^${RPM_BUILD_ROOT}%{_exec_prefix}/@tool_target@/(lib|include|sys-root)' \
45  | grep -v '^${RPM_BUILD_ROOT}%{cpukitlib}/@tool_target@/' | %__find_requires
46EOF
47chmod +x %{_builddir}/%{name}-%{version}/find-requires
48%define __find_requires %{_builddir}/%{name}-%{version}/find-requires
49
Note: See TracBrowser for help on using the repository browser.