Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2008-07-20 15:57:03 +1000
committerDan McGee <dan@archlinux.org>2008-07-20 19:06:14 -0500
commitae9e33ed88849bfdf4a9530f674701cc32d72563 (patch)
treebb419a0d20c23c1fe5004d2b615901201700d5d0 /scripts/makepkg.sh.in
parentb4f2cb53ef568534e672a877f3d47f85ca18f2af (diff)
Make strip paths configurable
This patch introduces a new STRIP_DIRS makepkg.conf option to change makepkg's search path when stripping binaries. Original work by: Thomas Bächler <thomas@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 27771025..ae199837 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -731,9 +731,12 @@ tidy_install() {
if [ "$(check_option strip)" = "y" ]; then
msg2 "$(gettext "Stripping debugging symbols from binaries and libraries...")"
- local binary bindirs
- bindirs="bin lib sbin usr/bin usr/lib usr/sbin usr/local/bin usr/local/lib usr/local/sbin opt/*/bin opt/*/lib opt/*/sbin"
- find ${bindirs} -type f 2>/dev/null | while read binary ; do
+ local binary
+ if [ -z "${STRIP_DIRS[@]}" ]; then
+ # fall back to default value
+ STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin})
+ fi
+ find ${STRIP_DIRS[@]} -type f 2>/dev/null | while read binary ; do
case "$(file -biz "$binary")" in
*application/x-sharedlib*) # Libraries (.so)
/usr/bin/strip --strip-debug "$binary";;