[redhat-rpm-config: 54/215] add brp-strip-static-archive

Panu Matilainen pmatilai at fedoraproject.org
Wed Apr 2 10:22:53 UTC 2014


commit 3397996dd936b6e09111e5c9a0e2de83b1f85f34
Author: Bill Nottingham <notting at redhat.com>
Date:   Thu Jan 9 19:52:00 2003 +0000

    add brp-strip-static-archive

 brp-strip-static-archive |   16 ++++++++++++++++
 macros                   |    1 +
 redhat-rpm-config.spec   |    5 ++++-
 3 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/brp-strip-static-archive b/brp-strip-static-archive
new file mode 100755
index 0000000..98d5d65
--- /dev/null
+++ b/brp-strip-static-archive
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
+	exit 0
+fi
+
+[ -z "$STRIP" -a -n "$1" ] && STRIP="$1"
+[ -z "$STRIP" ] && STRIP=strip
+
+# Strip static libraries.
+for f in `find $RPM_BUILD_ROOT -type f -a -exec file {} \; | \
+        grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug"  | \
+	grep 'current ar archive' | \
+	sed -n -e 's/^\(.*\):[ 	]*current ar archive/\1/p'`; do
+	$STRIP -g $f
+done
diff --git a/macros b/macros
index 9aa098b..9d73673 100644
--- a/macros
+++ b/macros
@@ -83,6 +83,7 @@
 %__os_install_post    \
     /usr/lib/rpm/redhat/brp-compress \
     /usr/lib/rpm/redhat/brp-strip %{__strip} \
+    /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \
     /usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \
 %{nil}
 
diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec
index 9ad6a77..709f692 100644
--- a/redhat-rpm-config.spec
+++ b/redhat-rpm-config.spec
@@ -1,6 +1,6 @@
 Summary: Red Hat specific rpm configuration files.
 Name: redhat-rpm-config
-Version: 8.0.16
+Version: 8.0.17
 Release: 1
 License: GPL
 Group: Development/System
@@ -27,6 +27,9 @@ rm -rf ${RPM_BUILD_ROOT}
 %{_prefix}/lib/rpm/redhat
 
 %changelog
+* Thu Jan  9 2002 Bill Nottingham <notting at redhat.com> 8.0.17-1
+- add brp-strip-static-archive from rpm-4.2-0.54
+
 * Tue Dec 17 2002 Bill Nottingham <notting at redhat.com> 8.0.16-1
 - make -g in rpmrc conditional on debug_package
 


More information about the scm-commits mailing list