mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
makepkg: move debug symbol stripping to separate function
Move stripping of files to a spearate function that will be expanded for the handling of creating debug symbol packages. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
6c22ef2c82
commit
6be96e7612
@ -1426,6 +1426,11 @@ run_package() {
|
|||||||
run_function_safe "$pkgfunc"
|
run_function_safe "$pkgfunc"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
strip_file() {
|
||||||
|
local binary=$1; shift
|
||||||
|
strip $@ "$binary"
|
||||||
|
}
|
||||||
|
|
||||||
tidy_install() {
|
tidy_install() {
|
||||||
cd_safe "$pkgdir"
|
cd_safe "$pkgdir"
|
||||||
msg "$(gettext "Tidying install...")"
|
msg "$(gettext "Tidying install...")"
|
||||||
@ -1480,16 +1485,19 @@ tidy_install() {
|
|||||||
# make sure library stripping variables are defined to prevent excess stripping
|
# make sure library stripping variables are defined to prevent excess stripping
|
||||||
[[ -z ${STRIP_SHARED+x} ]] && STRIP_SHARED="-S"
|
[[ -z ${STRIP_SHARED+x} ]] && STRIP_SHARED="-S"
|
||||||
[[ -z ${STRIP_STATIC+x} ]] && STRIP_STATIC="-S"
|
[[ -z ${STRIP_STATIC+x} ]] && STRIP_STATIC="-S"
|
||||||
local binary
|
local binary strip_flags
|
||||||
find . -type f -perm -u+w -print0 2>/dev/null | while read -d '' binary ; do
|
find . -type f -perm -u+w -print0 2>/dev/null | while read -d '' binary ; do
|
||||||
case "$(file -bi "$binary")" in
|
case "$(file -bi "$binary")" in
|
||||||
*application/x-sharedlib*) # Libraries (.so)
|
*application/x-sharedlib*) # Libraries (.so)
|
||||||
strip $STRIP_SHARED "$binary";;
|
strip_flags="$STRIP_SHARED";;
|
||||||
*application/x-archive*) # Libraries (.a)
|
*application/x-archive*) # Libraries (.a)
|
||||||
strip $STRIP_STATIC "$binary";;
|
strip_flags="$STRIP_STATIC";;
|
||||||
*application/x-executable*) # Binaries
|
*application/x-executable*) # Binaries
|
||||||
strip $STRIP_BINARIES "$binary";;
|
strip_flags="$STRIP_BINARIES";;
|
||||||
|
*)
|
||||||
|
continue ;;
|
||||||
esac
|
esac
|
||||||
|
strip_file "$binary" ${strip_flags}
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user