Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2015-03-08 12:02:50 +1000
committerAllan McRae <allan@archlinux.org>2015-03-15 15:32:58 +1000
commitf9cb4f3b9cc693a3723bd840682d399bcd1f3c87 (patch)
tree871ad348783633d6f12a666aa9f8afc85a40b994 /scripts/makepkg.sh.in
parent22a5128985dae3d480cbc41f54eb0782b1c1bec1 (diff)
libmakepkg: move helper functions into tidy/strip
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in48
1 files changed, 0 insertions, 48 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index a9c2ebb8..168f3348 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1615,54 +1615,6 @@ run_package() {
run_function_safe "$pkgfunc"
}
-build_id() {
- LANG=C readelf -n $1 | sed -n '/Build ID/ { s/.*: //p; q; }'
-}
-
-strip_file() {
- local binary=$1; shift
-
- if check_option "debug" "y"; then
- local bid=$(build_id "$binary")
-
- # has this file already been stripped
- if [[ -n "$bid" ]]; then
- if [[ -f "$dbgdir/.build-id/${bid:0:2}/${bid:2}.debug" ]]; then
- return
- fi
- elif [[ -f "$dbgdir/$binary.debug" ]]; then
- return
- fi
-
- mkdir -p "$dbgdir/${binary%/*}"
- objcopy --only-keep-debug "$binary" "$dbgdir/$binary.debug"
- objcopy --add-gnu-debuglink="$dbgdir/${binary#/}.debug" "$binary"
-
- # create any needed hardlinks
- while read -rd '' file ; do
- if [[ "${binary}" -ef "${file}" && ! -f "$dbgdir/${file}.debug" ]]; then
- mkdir -p "$dbgdir/${file%/*}"
- ln "$dbgdir/${binary}.debug" "$dbgdir/${file}.debug"
- fi
- done < <(find . -type f -perm -u+w -print0 2>/dev/null)
-
- if [[ -n "$bid" ]]; then
- local target
- mkdir -p "$dbgdir/.build-id/${bid:0:2}"
-
- target="../../../../../${binary#./}"
- target="${target/..\/..\/usr\/lib\/}"
- target="${target/..\/usr\/}"
- ln -s "$target" "$dbgdir/.build-id/${bid:0:2}/${bid:2}"
-
- target="../../${binary#./}.debug"
- ln -s "$target" "$dbgdir/.build-id/${bid:0:2}/${bid:2}.debug"
- fi
- fi
-
- strip $@ "$binary"
-}
-
find_libdepends() {
local d sodepends;