diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2006-02-14 15:27:52 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2006-02-14 15:27:52 +0000 |
commit | 2b6eb185c3dd30bc4913c655c5cfcb79703c1a77 (patch) | |
tree | 5f8c46f29b770e160b7a97fad368c982c950b087 /contrib/crossrpms/binutils/rpm-install.add | |
parent | 67023def73c2d0d1b38215e07efcf9453aaeb6e3 (diff) |
New.
Diffstat (limited to 'contrib/crossrpms/binutils/rpm-install.add')
-rw-r--r-- | contrib/crossrpms/binutils/rpm-install.add | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/contrib/crossrpms/binutils/rpm-install.add b/contrib/crossrpms/binutils/rpm-install.add new file mode 100644 index 0000000000..4745182408 --- /dev/null +++ b/contrib/crossrpms/binutils/rpm-install.add @@ -0,0 +1,32 @@ +# Extract %%__os_install_post into os_install_post~ +cat << \EOF >> os_install_post~ +%__os_install_post +EOF + +# Generate customized brp-*scripts +cat os_install_post~ | while read a x y; do +case $a in +# Prevent brp-strip* from trying to handle foreign binaries +*/brp-strip*) + b=$(basename $a) + sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b + chmod a+x $b + ;; +%if "%{_prefix}" != "/usr" +# Fix up brp-compress to handle %%_prefix != /usr +*/brp-compress*) + b=$(basename $a) + sed -e 's,\./usr/,./%{_prefix},' < $a > $b + chmod a+x $b + ;; +%endif +esac +done + +sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \ +%if "%{_prefix}" != "/usr" + -e 's,^[ ]*/usr/lib/rpm.*/brp-compress,./brp-compress,' \ +%endif +< os_install_post~ > os_install_post +%define __os_install_post . ./os_install_post + |