summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-09-29 08:17:12 +0200
committerAllan McRae <allan@archlinux.org>2012-11-27 06:16:15 +0100
commit13667fd4b132c655e300535e787ebcf9cbc29cd7 (patch)
tree307a6b2bd6c21a374abe6219232ce8cf41a870cd /scripts
parent7e8d9dfda2e80529b58cb345d359f805149fb68d (diff)
downloadpacman-13667fd4b132c655e300535e787ebcf9cbc29cd7.tar.gz
pacman-13667fd4b132c655e300535e787ebcf9cbc29cd7.tar.xz
makepkg: allow debug package suffix to be configurable
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.am1
-rw-r--r--scripts/makepkg.sh.in30
2 files changed, 16 insertions, 15 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 29c81aa5..2bd64118 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -53,6 +53,7 @@ edit = sed \
-e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
-e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
-e 's|@BUILDSCRIPT[@]|$(BUILDSCRIPT)|g' \
+ -e 's|@DEBUGSUFFIX[@]|$(DEBUGSUFFIX)|g' \
-e "s|@INODECMD[@]|$(INODECMD)|g" \
-e 's|@SIZECMD[@]|$(SIZECMD)|g' \
-e 's|@SEDINPLACE[@]|$(SEDINPLACE)|g' \
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index ba6119f5..915ee897 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1438,38 +1438,38 @@ strip_file() {
# has this file already been stripped
if [[ -n "$bid" ]]; then
- if [[ -f "$pkgdir-debug"/usr/lib/debug/.build_id/${bid:0:2}/${bid:2}.debug ]]; then
+ if [[ -f "$pkgdir-@DEBUGSUFFIX@"/usr/lib/debug/.build_id/${bid:0:2}/${bid:2}.debug ]]; then
return
fi
- elif [[ -f "$pkgdir-debug/usr/lib/debug/$binary.debug" ]]; then
+ elif [[ -f "$pkgdir-@DEBUGSUFFIX@/usr/lib/debug/$binary.debug" ]]; then
return
fi
- mkdir -p "$pkgdir-debug/usr/lib/debug/${binary%/*}"
- objcopy --only-keep-debug "$binary" "$pkgdir-debug/usr/lib/debug/$binary.debug"
- objcopy --add-gnu-debuglink="$pkgdir-debug/usr/lib/debug/${binary#/}.debug" "$binary"
+ mkdir -p "$pkgdir-@DEBUGSUFFIX@/usr/lib/debug/${binary%/*}"
+ objcopy --only-keep-debug "$binary" "$pkgdir-@DEBUGSUFFIX@/usr/lib/debug/$binary.debug"
+ objcopy --add-gnu-debuglink="$pkgdir-@DEBUGSUFFIX@/usr/lib/debug/${binary#/}.debug" "$binary"
# create any needed hardlinks
while read -d '' file ; do
if [[ "${binary}" -ef "${file}" &&
- ! -f "$pkgdir-debug/usr/lib/debug/${file}.debug" ]]; then
- mkdir -p "$pkgdir-debug/usr/lib/debug/${file%/*}"
- ln "$pkgdir-debug/usr/lib/debug/${binary}.debug" \
- "$pkgdir-debug/usr/lib/debug/${file}.debug"
+ ! -f "$pkgdir-@DEBUGSUFFIX@/usr/lib/debug/${file}.debug" ]]; then
+ mkdir -p "$pkgdir-@DEBUGSUFFIX@/usr/lib/debug/${file%/*}"
+ ln "$pkgdir-@DEBUGSUFFIX@/usr/lib/debug/${binary}.debug" \
+ "$pkgdir-@DEBUGSUFFIX@/usr/lib/debug/${file}.debug"
fi
done < <(find . -type f -perm -u+w -print0 2>/dev/null)
if [[ -n "$bid" ]]; then
local target
- mkdir -p "$pkgdir-debug/usr/lib/debug/.build_id/${bid:0:2}"
+ mkdir -p "$pkgdir-@DEBUGSUFFIX@/usr/lib/debug/.build_id/${bid:0:2}"
target="../../../../../${binary#./}"
target="${target/..\/..\/usr\/lib\/}"
target="${target/..\/usr\/}"
- ln -s "$target" "$pkgdir-debug/usr/lib/debug/.build_id/${bid:0:2}/${bid:2}"
+ ln -s "$target" "$pkgdir-@DEBUGSUFFIX@/usr/lib/debug/.build_id/${bid:0:2}/${bid:2}"
target="../../${binary#./}.debug"
- ln -s "$target" "$pkgdir-debug/usr/lib/debug/.build_id/${bid:0:2}/${bid:2}.debug"
+ ln -s "$target" "$pkgdir-@DEBUGSUFFIX@/usr/lib/debug/.build_id/${bid:0:2}/${bid:2}.debug"
fi
fi
@@ -1532,7 +1532,7 @@ tidy_install() {
[[ -z ${STRIP_STATIC+x} ]] && STRIP_STATIC="-S"
if check_option "debug" "y"; then
- mkdir -p $pkgdir-debug/usr/lib/debug
+ mkdir -p $pkgdir-@DEBUGSUFFIX@/usr/lib/debug
fi
local binary strip_flags
@@ -1870,7 +1870,7 @@ create_debug_package() {
return
fi
- pkgdir="${pkgdir}-debug"
+ pkgdir="${pkgdir}-@DEBUGSUFFIX@"
# check if we have any debug symbols to package
if dir_is_empty "$pkgdir/usr/lib/debug"; then
@@ -1879,7 +1879,7 @@ create_debug_package() {
depends=("$pkgname=$(get_full_version)")
pkgdesc="Detached debugging symbols for $pkgname"
- pkgname=$pkgname-debug
+ pkgname=$pkgname-@DEBUGSUFFIX@
unset groups optdepends provides conflicts replaces backup install changelog