summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac8
-rw-r--r--scripts/Makefile.am1
-rw-r--r--scripts/makepkg.sh.in30
3 files changed, 24 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index 1a90906e..faa0792f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,6 +97,11 @@ AC_ARG_WITH(buildscript,
AS_HELP_STRING([--with-buildscript=name], [set the build script name used by makepkg]),
[BUILDSCRIPT=$withval], [BUILDSCRIPT=PKGBUILD])
+# Help line for debug package suffix
+AC_ARG_WITH(debug-suffix,
+ AS_HELP_STRING([--with-debug-suffix=name], [set the suffix for split debugging symbol packages used by makepkg]),
+ [DEBUGSUFFIX=$withval], [DEBUGSUFFIX=debug])
+
# Help line for changing shell used to run install scriptlets
AC_ARG_WITH(scriptlet-shell,
AS_HELP_STRING([--with-scriptlet-shell=shell],
@@ -446,6 +451,9 @@ AC_DEFINE_UNQUOTED([SRCEXT], "$SRCEXT", [The file extension used by pacman sourc
# Set makepkg build script name
AC_SUBST(BUILDSCRIPT)
AC_DEFINE_UNQUOTED([BUILDSCRIPT], "$BUILDSCRIPT", [The build script name used by makepkg])
+# Set makepkg split debugging symbol package suffix
+AC_SUBST(DEBUGSUFFIX)
+AC_DEFINE_UNQUOTED([DEBUGSUFFIX], "$DEBUGSUFFIX", [The suffix for debugging symbol packages used by makepkg])
# Set shell used by install scriptlets
AC_SUBST(SCRIPTLET_SHELL)
AC_DEFINE_UNQUOTED([SCRIPTLET_SHELL], "$SCRIPTLET_SHELL", [The full path of the shell used to run install scriptlets])
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