summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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/"