strip binaries before creating package
This commit is contained in:
parent
b9ce3c170a
commit
6bbb1b6be9
17
abuild
17
abuild
@ -302,6 +302,7 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
|
stripbin
|
||||||
package_apk
|
package_apk
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -443,6 +444,22 @@ checksum() {
|
|||||||
echo "md5sums=\"$md5sums\""
|
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() {
|
usage() {
|
||||||
echo "$(basename $0) $abuild_ver"
|
echo "$(basename $0) $abuild_ver"
|
||||||
echo "usage: $0 [options] [cmd] ..."
|
echo "usage: $0 [options] [cmd] ..."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user