Commit 036557c8 authored by Natanael Copa's avatar Natanael Copa

abuild: make it possible override fakeroot

parent f1500271
...@@ -19,6 +19,7 @@ abuild_path=$(readlink -f $0) ...@@ -19,6 +19,7 @@ abuild_path=$(readlink -f $0)
# defaults # defaults
BUILD_BASE="build-base" BUILD_BASE="build-base"
SUDO=${SUDO:-"sudo"} SUDO=${SUDO:-"sudo"}
FAKEROOT=${FAKEROOT:-"fakeroot"}
# read config # read config
ABUILD_CONF=${ABUILD_CONF:-"$sysconfdir/abuild.conf"} ABUILD_CONF=${ABUILD_CONF:-"$sysconfdir/abuild.conf"}
...@@ -329,7 +330,7 @@ prepare_metafiles() { ...@@ -329,7 +330,7 @@ prepare_metafiles() {
echo "# Generated by $(basename $0) $abuild_ver" >"$pkginfo" echo "# Generated by $(basename $0) $abuild_ver" >"$pkginfo"
if [ -n "$FAKEROOTKEY" ]; then if [ -n "$FAKEROOTKEY" ]; then
echo "# using $(fakeroot -v)" >> "$pkginfo" echo "# using $($FAKEROOT -v)" >> "$pkginfo"
fi fi
echo "# $(date -u)" >> "$pkginfo" echo "# $(date -u)" >> "$pkginfo"
cat >> "$pkginfo" <<EOF cat >> "$pkginfo" <<EOF
...@@ -622,13 +623,14 @@ rootpkg() { ...@@ -622,13 +623,14 @@ rootpkg() {
local do_build=build local do_build=build
cd "$startdir" cd "$startdir"
if is_function package; then if is_function package; then
msg "Building without fakeroot"
build || return 1 build || return 1
do_build=package do_build=package
fi fi
cd "$startdir" cd "$startdir"
msg "Entering fakeroot..." [ -n "$FAKEROOT" ] && msg "Entering fakeroot..."
fakeroot "$abuild_path" $do_build prepare_subpackages prepare_package \ $FAKEROOT "$abuild_path" $do_build \
prepare_subpackages \
prepare_package \
create_apks create_apks
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment