diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2008-11-25 14:07:40 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2008-11-25 14:07:40 +0000 |
commit | 6bbb1b6be9ec380d7d165b08003e1ea4d72a13f4 (patch) | |
tree | 5f34e0949d3bfce56a0f841bdbb61acd7ee92b3b | |
parent | b9ce3c170a98058e71eef08205e37a2a22933277 (diff) | |
download | abuild-6bbb1b6be9ec380d7d165b08003e1ea4d72a13f4.tar.gz abuild-6bbb1b6be9ec380d7d165b08003e1ea4d72a13f4.tar.bz2 abuild-6bbb1b6be9ec380d7d165b08003e1ea4d72a13f4.tar.xz abuild-6bbb1b6be9ec380d7d165b08003e1ea4d72a13f4.zip |
strip binaries before creating package
-rwxr-xr-x | abuild | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -302,6 +302,7 @@ EOF } package() { + stripbin package_apk } @@ -443,6 +444,22 @@ checksum() { echo "md5sums=\"$md5sums\"" } +stripbin() { + local bin dirs=${STRIP_DIRS:-bin lib sbin usr/bin usr/lib usr/sbin} + cd "${subpkgdir:-$pkgdir}" || return 1 + msg "Stripping binaries" + find $dirs -type f 2>/dev/null | while read bin; do + local opt= + case "$(file -biz "$bin")" in + */x-sharedlib*|*/x-archive*) + strip --strip-debug "$bin";; + */x-executable*) + strip "$bin";; + esac + done + return 0 +} + usage() { echo "$(basename $0) $abuild_ver" echo "usage: $0 [options] [cmd] ..." |