abuild: set default builddir when not defined in APKBUILD

This commit is contained in:
Jakub Jirutka 2016-08-20 16:22:22 +02:00
parent 35077b43e8
commit 4f37c8efd3
1 changed files with 3 additions and 2 deletions

View File

@ -568,8 +568,7 @@ default_prepare() {
if ! have_patches; then if ! have_patches; then
return 0 return 0
fi fi
cd "${builddir:-$srcdir/$pkgname-$pkgver}" \ cd "$builddir" || { error "Is \$builddir set correctly?"; return 1; }
|| { error "Is \$builddir set correctly?"; return 1; }
for i in $source; do for i in $source; do
case $i in case $i in
*.patch) *.patch)
@ -2239,6 +2238,8 @@ export CC
cd "$startdir" || die cd "$startdir" || die
. "$APKBUILD" . "$APKBUILD"
builddir=${builddir:-"$srcdir/$pkgname-$pkgver"}
# If REPODEST is set then it will override the PKGDEST # If REPODEST is set then it will override the PKGDEST
if [ -z "$REPODEST" ]; then if [ -z "$REPODEST" ]; then
warning "REPODEST is not set and is now required. Defaulting to ~/packages" warning "REPODEST is not set and is now required. Defaulting to ~/packages"