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 8.0.17-1 +- add brp-strip-static-archive from rpm-4.2-0.54 + * Tue Dec 17 2002 Bill Nottingham 8.0.16-1 - make -g in rpmrc conditional on debug_package