summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2000-10-28 17:30:58 +0000
committerjbj <devnull@localhost>2000-10-28 17:30:58 +0000
commite407eeefe7afcbfbfb11d213ac08f102c8200db7 (patch)
tree79de772c66e7626e456ea08fe079a274026e5daf
parent3ad99fcba52fcc5e8ab636d2f1760c945cdfbf19 (diff)
downloadlibrpm-tizen-e407eeefe7afcbfbfb11d213ac08f102c8200db7.tar.gz
librpm-tizen-e407eeefe7afcbfbfb11d213ac08f102c8200db7.tar.bz2
librpm-tizen-e407eeefe7afcbfbfb11d213ac08f102c8200db7.zip
- add brp-strip-shared script <rodrigob@conectiva.com.br>.
CVS patchset: 4231 CVS date: 2000/10/28 17:30:58
-rw-r--r--CHANGES1
-rw-r--r--scripts/Makefile.am2
-rw-r--r--scripts/brp-strip-shared17
3 files changed, 20 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 889b8bab0..032e5e596 100644
--- a/CHANGES
+++ b/CHANGES
@@ -20,6 +20,7 @@
- add cscope/ctags (Rodrigo Barbosa<rodrigob@conectiva.com.br>).
- remove getMacroBody() from rpmio API.
- hide libio lossage in prototype, not API.
+ - add brp-strip-shared script <rodrigob@conectiva.com.br>.
3.0.6 -> 4.0
- use DIRNAMES/BASENAMES/DIRINDICES not FILENAMES in packages and db.
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 8cdc6c97a..5e8f649f9 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -4,6 +4,7 @@ AUTOMAKE_OPTIONS = 1.4 foreign
EXTRA_DIST = \
brp-compress brp-redhat brp-strip brp-strip-comment-note \
+ brp-strip-shared \
brp-sparc64-linux check-prereqs convertrpmrc.sh find-lang.sh \
find-prov.pl find-req.pl cpanflute find-provides.perl \
find-requires.perl get_magic.pl getpo.sh http.req \
@@ -17,6 +18,7 @@ all:
configdir = ${prefix}/lib/rpm
config_SCRIPTS = \
brp-compress brp-redhat brp-strip brp-strip-comment-note \
+ brp-strip-shared \
brp-sparc64-linux check-prereqs convertrpmrc.sh find-lang.sh \
find-prov.pl find-req.pl cpanflute find-provides.perl \
find-requires.perl get_magic.pl getpo.sh http.req \
diff --git a/scripts/brp-strip-shared b/scripts/brp-strip-shared
new file mode 100644
index 000000000..501a278d1
--- /dev/null
+++ b/scripts/brp-strip-shared
@@ -0,0 +1,17 @@
+#!/bin/sh
+# Conectiva brp - strip shared libraries. Based on Red Hat's brp-strip.
+# Thu Apr 20 - Guilherme Manika <gwm@conectiva.com.br>
+# Created file
+
+if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
+ exit 0
+fi
+
+# Strip ELF shared objects
+# Please note we don't restrict our search to executable files because
+# our libraries are not (should not be, at least) +x.
+for f in `find $RPM_BUILD_ROOT -type f -a -exec file {} \; | \
+ grep ' shared object,' | \
+ sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do
+ strip --strip-unneeded $f
+done