]> git.pld-linux.org Git - packages/rpm-build-macros.git/commitdiff
- added %__spec_install_post_chrpath macro.
authorkloczek <kloczek@pld-linux.org>
Mon, 14 Oct 2002 09:49:04 +0000 (09:49 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm.macros -> 1.84

rpm.macros

index c48537b8effc8e5413df2af6d15a957d2f97ef6a..62311ad20e6713a2e2aa67e2b5a3b4538224d8f0 100644 (file)
@@ -194,6 +194,25 @@ echo "Compress man and info pages."; \
        fi; } \
 } }
 #-----------------------------------------------------------------
+# remove all RPATH from executable binaries and shared object files
+#
+# Requires: find, awk, strip, cut, xargs
+#
+#%no_install_post_chrpath      1
+%__spec_install_post_chrpath {%{!?debug: \
+%{!?no_install_post_chrpath: \
+       %{?verbose:set -x;} \
+       echo "Remove RPATH from executable binaries and shared object files."; \
+       filelist=`find $RPM_BUILD_ROOT -type f ! -regex ".*ld-[0-9.]*so.*"`; \
+       elfexelist=`echo $filelist | xargs -r file | \
+               awk '/ELF.*executable/ {print $1}' | cut -d: -f1`; \
+       elfsharedlist=`echo $filelist | xargs -r file | \
+               awk '/LF.*shared object/ {print $1}' | cut -d: -f1`; \
+       if [ -n "$elfexelist$elfsharedlist" ]; then \
+               chrpath -d $elfexelist $elfsharedlist; \
+       fi; \
+} }
+#-----------------------------------------------------------------
 # Find and gzip all kernel modules
 #
 # Requires: find
@@ -249,6 +268,7 @@ fi \
 %{?_noautoprovfiles:for f in %{_noautoprovfiles} ; do echo %{?buildroot:%{buildroot}}$f >> %{_builddir}/__rpm_noautoprovfiles ; done }\
 %{?_noautoprov:for f in %{_noautoprov} ; do echo "$f" >> %{_builddir}/__rpm_noautoprov ; done }\
 %{__spec_install_post_strip}\
+%{__spec_install_post_chrpath}\
 %{__spec_install_post_compress_docs}\
 %{__spec_install_post_compress_modules}\
 %{__arch_install_post}\
This page took 0.531246 seconds and 4 git commands to generate.