forked from kiss-community/repo
pkg_strip: add initial support
This commit is contained in:
parent
fe00112963
commit
c2974e0179
14
puke
14
puke
@ -83,6 +83,19 @@ pkg_build() {
|
|||||||
log "Sucessfully built $pkg." 2> "$pkg_db/$name/manifest"
|
log "Sucessfully built $pkg." 2> "$pkg_db/$name/manifest"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pkg_strip() {
|
||||||
|
find "$pkg_dir" -type f | while read -r binary; do
|
||||||
|
case "$(file -bi "$binary")" in
|
||||||
|
application/x-sharedlib*|application/x-pie-executable*)
|
||||||
|
strip_opts="--strip-unneeded"
|
||||||
|
;;
|
||||||
|
application/x-archive*) strip_opts="--strip-debug" ;;
|
||||||
|
application/x-executable*) strip_opts="--strip-all" ;;
|
||||||
|
esac
|
||||||
|
strip "$strip_opts" "$binary" 2>/dev/null
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
pkg_manifest() {
|
pkg_manifest() {
|
||||||
(cd "$pkg_dir" && find ./*) | sed ss.ss | tac |
|
(cd "$pkg_dir" && find ./*) | sed ss.ss | tac |
|
||||||
tee manifest > "$pkg_db/$name/manifest"
|
tee manifest > "$pkg_db/$name/manifest"
|
||||||
@ -147,6 +160,7 @@ args() {
|
|||||||
pkg_verify
|
pkg_verify
|
||||||
pkg_extract
|
pkg_extract
|
||||||
pkg_build
|
pkg_build
|
||||||
|
pkg_strip
|
||||||
pkg_manifest
|
pkg_manifest
|
||||||
pkg_tar ;;
|
pkg_tar ;;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user