source: rtems/contrib/crossrpms/gcc/rpm-install.add @ 1a34b8c

4.104.115
Last change on this file since 1a34b8c was 156764a6, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/05/08 at 17:08:10

Filter find-debuginfo.sh not to mistreat foreign binaries.

  • Property mode set to 100644
File size: 2.2 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}-%{gcc_rpmvers}/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}%{gcclib}/@tool_target@/' | %__find_provides
38EOF
39chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
40%define __find_provides %{_builddir}/%{name}-%{gcc_rpmvers}/find-provides
41
42cat << EOF > %{_builddir}/%{name}-%{gcc_rpmvers}/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}%{gcclib}/@tool_target@/' | %__find_requires
46EOF
47chmod +x %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
48%define __find_requires %{_builddir}/%{name}-%{gcc_rpmvers}/find-requires
49
50
51# Extract %%__debug_install_post into debug_install_post~
52cat << \EOF > debug_install_post~
53%__debug_install_post
54EOF
55
56# Generate customized debug_install_post script
57cat debug_install_post~ | while read a x y; do
58case $a in
59# Prevent find-debuginfo.sh* from trying to handle foreign binaries
60*/find-debuginfo.sh)
61  b=$(basename $a)
62  sed -e 's,find "$RPM_BUILD_ROOT" !,find "$RPM_BUILD_ROOT"%_bindir "$RPM_BUILD_ROOT"%_libexecdir !,' $a > $b
63  chmod a+x $b
64  ;;
65esac
66done
67
68sed -e 's,^[ ]*/usr/lib/rpm/find-debuginfo.sh,./find-debuginfo.sh,' \
69< debug_install_post~ > debug_install_post
70%define __debug_install_post . ./debug_install_post
71
72
Note: See TracBrowser for help on using the repository browser.