1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

makepkg: append pkgbase to BUILDDIR if specified

This means multiple packages can be build using the same BUILDDIR
without their source files all ending up extracted in the same
directory.  Fixes FS#28417.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Allan McRae 2012-03-09 16:01:28 +10:00 committed by Dan McGee
parent d521f30f07
commit 03465ad6b6

View File

@ -2061,8 +2061,6 @@ if [[ ! -w $BUILDDIR ]]; then
plain "$(gettext "Aborting...")" plain "$(gettext "Aborting...")"
exit 1 exit 1
fi fi
srcdir="$BUILDDIR/src"
pkgdir="$BUILDDIR/pkg"
PKGDEST=${_PKGDEST:-$PKGDEST} PKGDEST=${_PKGDEST:-$PKGDEST}
PKGDEST=${PKGDEST:-$startdir} #default to $startdir if undefined PKGDEST=${PKGDEST:-$startdir} #default to $startdir if undefined
@ -2159,6 +2157,14 @@ fi
pkgbase=${pkgbase:-${pkgname[0]}} pkgbase=${pkgbase:-${pkgname[0]}}
epoch=${epoch:-0} epoch=${epoch:-0}
if [[ $BUILDDIR = "$startdir" ]]; then
srcdir="$BUILDDIR/src"
pkgdir="$BUILDDIR/pkg"
else
srcdir="$BUILDDIR/$pkgbase/src"
pkgdir="$BUILDDIR/$pkgbase/pkg"
fi
if (( GENINTEG )); then if (( GENINTEG )); then
mkdir -p "$srcdir" mkdir -p "$srcdir"
chmod a-s "$srcdir" chmod a-s "$srcdir"