summaryrefslogtreecommitdiff
path: root/scripts/brp-strip
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2000-01-07 17:32:27 +0000
committerjbj <devnull@localhost>2000-01-07 17:32:27 +0000
commit65e8fdb8f9bf5857e1c4ebf8adbefc566126037c (patch)
tree74a9aa5d65118dabcce260de323bc283ef0e0cce /scripts/brp-strip
parentba46bbb4feb8c4fab914cfc835e953d8d94485a4 (diff)
downloadlibrpm-tizen-65e8fdb8f9bf5857e1c4ebf8adbefc566126037c.tar.gz
librpm-tizen-65e8fdb8f9bf5857e1c4ebf8adbefc566126037c.tar.bz2
librpm-tizen-65e8fdb8f9bf5857e1c4ebf8adbefc566126037c.zip
add several BuildRoot FTW policies.
CVS patchset: 3511 CVS date: 2000/01/07 17:32:27
Diffstat (limited to 'scripts/brp-strip')
-rwxr-xr-xscripts/brp-strip12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/brp-strip b/scripts/brp-strip
new file mode 100755
index 000000000..7e2939af6
--- /dev/null
+++ b/scripts/brp-strip
@@ -0,0 +1,12 @@
+#!/bin/sh
+# If using normal root, avoid changing anything.
+if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
+ exit 0
+fi
+
+# Strip ELF binaries
+for f in `find $RPM_BUILD_ROOT -type f -a -perm +111 -exec file {} \; | \
+ grep -v ' shared object,' | \
+ sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do
+ strip $f
+done