makepkg: Add a config option to specify the location of debug sources

In commit 8b0d59b83a support was added for
storing the source files of binaries in debug packages. Allow the user
to specify where those source files should be stored via makepkg.conf

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Eli Schwartz 2017-10-30 14:35:22 -04:00 committed by Allan McRae
parent 1825bd6716
commit 259d521e37
3 changed files with 9 additions and 1 deletions

View file

@ -218,6 +218,12 @@ Options
instruct makepkg which files to remove from the package. This is instruct makepkg which files to remove from the package. This is
useful for index files that are added by multiple packages. useful for index files that are added by multiple packages.
**DBGSRCDIR=**"/usr/src/debug"::
If `strip` and `debug` are specified in the `OPTIONS` array, this variable
will instruct makepkg where to place source files for installed binaries.
The binaries will be modified to link this directory for the debugger
search path.
**PKGDEST=**"/path/to/directory":: **PKGDEST=**"/path/to/directory"::
If this value is not set, packages will, by default, be placed in the If this value is not set, packages will, by default, be placed in the
current directory (location of the linkman:PKGBUILD[5]). Many people current directory (location of the linkman:PKGBUILD[5]). Many people

View file

@ -99,6 +99,8 @@ MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc}) DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Files to be removed from all packages (if purge is specified) #-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod) PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
#-- Directory to store source code in for debug packages
DBGSRCDIR="/usr/src/debug"
######################################################################### #########################################################################
# PACKAGE OUTPUT # PACKAGE OUTPUT

View file

@ -107,7 +107,7 @@ tidy_strip() {
if check_option "debug" "y"; then if check_option "debug" "y"; then
dbgdir="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@/usr/lib/debug" dbgdir="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@/usr/lib/debug"
dbgsrc="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@/usr/src/debug" dbgsrc="$pkgdirbase/$pkgbase-@DEBUGSUFFIX@${DBGSRCDIR:-/usr/src/debug}"
mkdir -p "$dbgdir" "$dbgsrc" mkdir -p "$dbgdir" "$dbgsrc"
fi fi