summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/makepkg.8.txt4
-rw-r--r--scripts/makepkg.sh.in2
2 files changed, 6 insertions, 0 deletions
diff --git a/doc/makepkg.8.txt b/doc/makepkg.8.txt
index a10242d2..e24463c2 100644
--- a/doc/makepkg.8.txt
+++ b/doc/makepkg.8.txt
@@ -229,6 +229,10 @@ Environment Variables
Folder where the package will be built. Overrides the corresponding
value defined in linkman:makepkg.conf[5].
+**CARCH=**"(i686|x86_64)"::
+ Force build for a specific architecture. Useful for cross-compiling.
+ Overrides the corresponding value defined in linkman:makepkg.conf[5].
+
Configuration
-------------
See linkman:makepkg.conf[5] for more details on configuring makepkg using the
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index fca2f2e3..1d737d07 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -2638,6 +2638,7 @@ trap 'trap_exit USR1 "$(gettext "An unknown error has occurred. Exiting...")"' E
[[ -n ${SRCEXT} ]] && _SRCEXT=${SRCEXT}
[[ -n ${GPGKEY} ]] && _GPGKEY=${GPGKEY}
[[ -n ${PACKAGER} ]] && _PACKAGER=${PACKAGER}
+[[ -n ${CARCH} ]] && _CARCH=${CARCH}
# default config is makepkg.conf
MAKEPKG_CONF=${MAKEPKG_CONF:-$confdir/makepkg.conf}
@@ -2737,6 +2738,7 @@ PKGEXT=${_PKGEXT:-$PKGEXT}
SRCEXT=${_SRCEXT:-$SRCEXT}
GPGKEY=${_GPGKEY:-$GPGKEY}
PACKAGER=${_PACKAGER:-$PACKAGER}
+CARCH=${_CARCH:-$CARCH}
if (( ! INFAKEROOT )); then
if (( EUID == 0 && ! ASROOT )); then