summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-05-02 15:23:54 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-05-02 15:23:54 +0200
commit4a4455c0867ca678726c7692450c576c75f830a9 (patch)
treefae074686154f046253ec63e42dd4e096b1aebb6
parent52e140f2fe6633c248438416c9c0ff5d2e015ee1 (diff)
downloaddevtools-4a4455c0867ca678726c7692450c576c75f830a9.tar.xz
Set target CARCH before sourcing the PKGBUILD
CARCH might be used within the PKGBUILD to select correct sources
-rwxr-xr-xmakechrootpkg2
1 files changed, 2 insertions, 0 deletions
diff --git a/makechrootpkg b/makechrootpkg
index fa1070a..9daeb89 100755
--- a/makechrootpkg
+++ b/makechrootpkg
@@ -147,6 +147,8 @@ if ! grep 'SRCDEST=/srcdest' "$copydir/etc/makepkg.conf" >/dev/null 2>&1; then
echo 'SRCDEST=/srcdest' >> "$copydir/etc/makepkg.conf"
fi
+# Set target CARCH as it might be used within the PKGBUILD to select correct sources
+CARCH=$(eval $(grep '^CARCH=' "$copydir/etc/makepkg.conf"))
# Copy PKGBUILD and sources
source PKGBUILD
cp PKGBUILD "$copydir/build/"