summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-03-18 03:19:24 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-03-18 03:19:24 (EDT)
commit737e59f749774b8e617cf3a284efa339c98bfc21 (patch)
tree4a3909697beed1a6946a242719df65b0567f5cb4
parent02656602e50399259efc78c1483d192e17276ace (diff)
opkbuild: Allow overriding of ob-* commands directory
-rw-r--r--src/opkbuild.sh31
1 files changed, 19 insertions, 12 deletions
diff --git a/src/opkbuild.sh b/src/opkbuild.sh
index 7e5aa11..7074713 100644
--- a/src/opkbuild.sh
+++ b/src/opkbuild.sh
@@ -36,6 +36,7 @@ export OPK_HOST_ARCH_KERNEL=
export OPK_HOST_ARCH_LIBS=
export OPK_HOST_PLAT=
+bindir=
opt_build=
opt_arch_dep=
opt_plat_dep=
@@ -261,13 +262,13 @@ build_source()
esac
done
- if ! OB_DO_SOURCE='true' "${BINDIR}/ob-gencontrol"; then
+ if ! OB_DO_SOURCE='true' "${bindir}/ob-gencontrol"; then
return 1
fi
- if ! OB_DO_SOURCE='true' "${BINDIR}/ob-buildopk"; then
+ if ! OB_DO_SOURCE='true' "${bindir}/ob-buildopk"; then
return 1
fi
- if ! OB_DO_SOURCE='true' "${BINDIR}/ob-genchanges"; then
+ if ! OB_DO_SOURCE='true' "${bindir}/ob-genchanges"; then
return 1
fi
@@ -316,15 +317,15 @@ setup_build()
fi
fi
- eval "$("${BINDIR}/ob-buildenv" | sed 's/^/export /')"
+ eval "$("${bindir}/ob-buildenv" | sed 's/^/export /')"
- if ! "${BINDIR}/ob-unpacksource"; then
+ if ! "${bindir}/ob-unpacksource"; then
return 1
fi
- if ! "${BINDIR}/ob-applypatches"; then
+ if ! "${bindir}/ob-applypatches"; then
return 1
fi
- if ! "${BINDIR}/ob-installplatconf"; then
+ if ! "${bindir}/ob-installplatconf"; then
return 1
fi
@@ -337,10 +338,10 @@ build()
'')
../build build &&
${opt_uid0_cmd} -- ../build install &&
- ${opt_uid0_cmd} -- "${BINDIR}/ob-installdocs" &&
- ${opt_uid0_cmd} -- "${BINDIR}/ob-gencontrol" &&
- ${opt_uid0_cmd} -- "${BINDIR}/ob-buildopk" &&
- ${opt_uid0_cmd} -- "${BINDIR}/ob-genchanges" ||
+ ${opt_uid0_cmd} -- "${bindir}/ob-installdocs" &&
+ ${opt_uid0_cmd} -- "${bindir}/ob-gencontrol" &&
+ ${opt_uid0_cmd} -- "${bindir}/ob-buildopk" &&
+ ${opt_uid0_cmd} -- "${bindir}/ob-genchanges" ||
return 1
;;
'install'|'install-'*)
@@ -384,6 +385,12 @@ main()
return 1
fi
+ if [ x"${OB_BINDIR:+set}" = x'set' ]; then
+ bindir="${OB_BINDIR}"
+ else
+ bindir="${BINDIR}"
+ fi
+
test_uid0_cmd || return 1
setup_arch_plat || return 1
@@ -400,7 +407,7 @@ main()
if [ x"${opt_build}" != x'source' ]; then
print_arch_stats
if "${opt_check_build_deps}"; then
- if ! "${BINDIR}/ob-checkbuilddeps"; then
+ if ! "${bindir}/ob-checkbuilddeps"; then
return 1
fi
fi