summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cmd/build.sh25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/cmd/build.sh b/src/cmd/build.sh
index 13792b3..feced70 100644
--- a/src/cmd/build.sh
+++ b/src/cmd/build.sh
@@ -73,8 +73,10 @@ cmd_build_main()
local root=
local dev=
local opkbuild_optstring=
- local arch=
- local plat=
+ local build_arch=
+ local build_plat=
+ local host_arch=
+ local host_plat=
local first_arg=
local arg=
local es=
@@ -98,12 +100,14 @@ cmd_build_main()
_cmd_build_root="${root}"
opkbuild_optstring="$(cat -- "${root}/usr/share/opkbuild/optstring")"
- arch="$(cat -- "${root}/etc/proteanos_arch")"
- plat="$(cat -- "${root}/etc/proteanos_plat")"
+ build_arch="$(cat -- "${root}/etc/proteanos_arch")"
+ build_plat="$(cat -- "${root}/etc/proteanos_plat")"
+ host_arch="${build_arch}"
+ host_plat="${build_plat}"
while getopts "${opkbuild_optstring}" opt 2>/dev/null; do
case "${opt}" in
- a) arch="${OPTARG}";;
- p) plat="${OPTARG}";;
+ a) host_arch="${OPTARG}";;
+ p) host_plat="${OPTARG}";;
esac
done
@@ -133,7 +137,7 @@ cmd_build_main()
[ "x${dev}" != 'x' ] && block_umount "${root}"
return 2
fi
- package_set_substvars "${arch}" "${plat}"
+ package_set_substvars "${host_arch}" "${host_plat}"
if ! session_begin "${root}" "${_cmd_build_pkg_dir}" false; then
_cmd_build_fini
@@ -143,12 +147,13 @@ cmd_build_main()
es=0
- _cmd_build_build_deps="$(package_get_build_deps "${arch}" "${plat}")"
+ _cmd_build_build_deps="$(package_get_build_deps \
+ "${host_arch}" "${host_plat}")"
if [ "x${_cmd_build_build_deps}" != 'x' ]; then
_cmd_build_make_deps_pkg
- if session_exec opkg -a "${arch}" print-architecture \
+ if session_exec opkg -a "${host_arch}" print-architecture \
1>/dev/null 2>&1; then
- session_exec opkg -a "${arch}" \
+ session_exec opkg -a "${host_arch}" \
install ../builddeps.opk || es=${?}
else
session_exec opkg install ../builddeps.opk || es=${?}