This patch introduces a new STRIP_DIRS makepkg.conf option to change makepkg's search path when stripping binaries. --- etc/makepkg.conf.in | 2 ++ scripts/makepkg.sh.in | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/etc/makepkg.conf.in b/etc/makepkg.conf.in index bb2018f..75dd0e9 100644 --- a/etc/makepkg.conf.in +++ b/etc/makepkg.conf.in @@ -73,6 +73,8 @@ OPTIONS=(strip docs libtool emptydirs zipman) INTEGRITY_CHECK=(md5) #-- Info and doc directories to remove (if option set correctly above) DOC_DIRS=(usr/{,share/}{info,doc,gtk-doc} opt/*/{info,doc,gtk-doc}) +#-- Directories to be searched for the strip option +STRIP_DIRS=(bin lib sbin usr/{bin,lib,sbin,local/{bin,lib,sbin}} opt/*/{bin,lib,sbin}) ######################################################################### # PACKAGE OUTPUT diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index c809498..4a6f9b2 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -737,9 +737,11 @@ 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 + 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 /usr/bin/strip --strip-debug "$binary";; -- 1.5.6