summaryrefslogtreecommitdiffstats
path: root/abuild.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-10-24 20:53:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-10-24 20:53:31 +0000
commit036557c8c0d4da21fd01aa6d70e782f6934a4071 (patch)
tree980bd5fba4168959efa9f5c5ea782149954db37f /abuild.in
parentf150027100d2488b318af935979c9b32ff420c71 (diff)
downloadabuild-036557c8c0d4da21fd01aa6d70e782f6934a4071.tar.bz2
abuild-036557c8c0d4da21fd01aa6d70e782f6934a4071.tar.xz
abuild: make it possible override fakeroot
Diffstat (limited to 'abuild.in')
-rwxr-xr-xabuild.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/abuild.in b/abuild.in
index c6f85c1..c7772b6 100755
--- a/abuild.in
+++ b/abuild.in
@@ -19,6 +19,7 @@ abuild_path=$(readlink -f $0)
# defaults
BUILD_BASE="build-base"
SUDO=${SUDO:-"sudo"}
+FAKEROOT=${FAKEROOT:-"fakeroot"}
# read config
ABUILD_CONF=${ABUILD_CONF:-"$sysconfdir/abuild.conf"}
@@ -329,7 +330,7 @@ prepare_metafiles() {
echo "# Generated by $(basename $0) $abuild_ver" >"$pkginfo"
if [ -n "$FAKEROOTKEY" ]; then
- echo "# using $(fakeroot -v)" >> "$pkginfo"
+ echo "# using $($FAKEROOT -v)" >> "$pkginfo"
fi
echo "# $(date -u)" >> "$pkginfo"
cat >> "$pkginfo" <<EOF
@@ -622,13 +623,14 @@ rootpkg() {
local do_build=build
cd "$startdir"
if is_function package; then
- msg "Building without fakeroot"
build || return 1
do_build=package
fi
cd "$startdir"
- msg "Entering fakeroot..."
- fakeroot "$abuild_path" $do_build prepare_subpackages prepare_package \
+ [ -n "$FAKEROOT" ] && msg "Entering fakeroot..."
+ $FAKEROOT "$abuild_path" $do_build \
+ prepare_subpackages \
+ prepare_package \
create_apks
}