FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 09-23-2012, 02:44 PM
Allan McRae
 
Default 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>
---
scripts/makepkg.sh.in | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 7b516ff..5283d73 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1421,6 +1421,11 @@ run_package() {
run_function_safe "$pkgfunc"
}

+strip_file() {
+ local binary=$1; shift
+ strip $@ $binary
+}
+
tidy_install() {
cd_safe "$pkgdir"
msg "$(gettext "Tidying install...")"
@@ -1475,16 +1480,19 @@ tidy_install() {
# make sure library stripping variables are defined to prevent excess stripping
[[ -z ${STRIP_SHARED+x} ]] && STRIP_SHARED="-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
case "$(file -bi "$binary")" in
*application/x-sharedlib*) # Libraries (.so)
- strip $STRIP_SHARED "$binary";;
+ strip_flags=($STRIP_SHARED);;
*application/x-archive*) # Libraries (.a)
- strip $STRIP_STATIC "$binary";;
+ strip_flags=($STRIP_STATIC);;
*application/x-executable*) # Binaries
- strip $STRIP_BINARIES "$binary";;
+ strip_flags=($STRIP_BINARIES);;
+ *)
+ continue ;;
esac
+ strip_file $binary ${strip_flags[@]}
done
fi

--
1.7.12.1
 

Thread Tools




All times are GMT. The time now is 04:37 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org