diff options
author | Erich Eckner <git@eckner.net> | 2020-02-19 09:38:37 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-02-19 09:52:08 +0100 |
commit | 6c81e041e1bdede86b861e23f215bfd2b73aa0fd (patch) | |
tree | 4d876336e339c13166be4e21e6979c5bbd2b0aad | |
parent | cb6484fe4538e34490a44661d8579c370cccea0b (diff) | |
download | devtools32-6c81e041e1bdede86b861e23f215bfd2b73aa0fd.tar.xz |
allow PKGEXT to be set from the environment
-rw-r--r-- | archbuild.in | 2 | ||||
-rw-r--r-- | makechrootpkg.in | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/archbuild.in b/archbuild.in index 5b98976..32f0d03 100644 --- a/archbuild.in +++ b/archbuild.in @@ -48,7 +48,7 @@ while getopts 'hcr:' arg; do esac done -check_root SOURCE_DATE_EPOCH,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,MAKEFLAGS,PACKAGER,GNUPGHOME +check_root SOURCE_DATE_EPOCH,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,MAKEFLAGS,PACKAGER,GNUPGHOME,PKGEXT # Pass all arguments after -- right to makepkg makechrootpkg_args+=("${@:$OPTIND}") diff --git a/makechrootpkg.in b/makechrootpkg.in index dfea18c..61e2f98 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -178,6 +178,9 @@ prepare_chroot() { grep -q "^$x" "$copydir/etc/makepkg.conf" && continue echo "$x" >>"$copydir/etc/makepkg.conf" done + if [ -n "${PKGEXT}" ]; then + sed -i 's/^PKGEXT=.*/PKGEXT='"'${PKGEXT}'"'/' "$copydir/etc/makepkg.conf" + fi cat > "$copydir/etc/sudoers.d/builduser-pacman" <<EOF builduser ALL = NOPASSWD: /usr/bin/pacman @@ -323,9 +326,11 @@ done umask 0022 ORIG_HOME=$HOME +ORIG_PKGEXT=$PKGEXT IFS=: read -r _ _ _ _ _ HOME _ < <(getent passwd "${SUDO_USER:-$USER}") load_makepkg_config HOME=$ORIG_HOME +PKGEXT=$ORIG_PKGEXT # Use PKGBUILD directory if these don't exist [[ -d $PKGDEST ]] || PKGDEST=$PWD |