diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libretools.conf | 15 | ||||
-rwxr-xr-x | src/treepkg | 13 |
2 files changed, 17 insertions, 11 deletions
diff --git a/src/libretools.conf b/src/libretools.conf index 4b1973a..12c4392 100644 --- a/src/libretools.conf +++ b/src/libretools.conf @@ -48,22 +48,21 @@ HOOKPRERELEASE="ssh -fN ${REPODEST%%:*}" HOOKPOSTRELEASE="sudo librechroot clean-repo" ################################################################################ -# fullpkg/treepkg # +# dagpkg/fullpkg/treepkg # ################################################################################ -# Note: fullpkg accepts HOOK* settings not being set, treepkg requires them to -# be set. +# Note: Not being set is valid for any of the HOOK* settings. +# Run a command to modify ./PKGBUILD before building # NOTE: fullpkg ONLY #HOOKPKGBUILDMOD="mips-add" -# Run a command before running FULLBUILDCMD, usually to cleanup uneeded packages -# Note: Recent versions of libremakepkg run chcleanup for you. -# NOTE: treepkg ONLY -HOOKPREBUILD=":" -#HOOKPREBUILD="chcleanup" +# Run a command before running FULLBUILDCMD +# NOTE: IGNORED by fullpkg +#HOOKPREBUILD="" ## Uncomment one of those or make one of your choice +# NOTE: fullpkg passes this to eval(1bash), where the others run it directly. # Normal FULLBUILDCMD="sudo libremakepkg" # Cross compiling diff --git a/src/treepkg b/src/treepkg index bfe2163..4dc29dc 100755 --- a/src/treepkg +++ b/src/treepkg @@ -19,7 +19,9 @@ source libremessages source $(librelib conf.sh) load_files libretools -check_vars libretools HOOKPREBUILD FULLBUILDCMD HOOKLOCALRELEASE || exit 1 +check_vars libretools FULLBUILDCMD || exit 1 +# The following variables are actually optional +#check_vars libretools HOOKPREBUILD HOOKLOCALRELEASE || exit 1 load_files makepkg term_title "${0##*/}" @@ -205,11 +207,16 @@ if [[ ${DEPTH} -eq 0 ]]; then pushd "${BUILDDIR}/${_pkg}" >/dev/null sudo -E pacman -Syu --noconfirm - ${HOOKPREBUILD} + if [[ -n "${HOOKPREBUILD:-}" ]]; then + ${HOOKPREBUILD} + fi ${FULLBUILDCMD} + # Run local release hook with $1 = $repo - ${HOOKLOCALRELEASE} $(egrep ";${_pkg#*_};" "${BUILDORDER}" | cut -d';' -f6) + if [[ -n "${HOOKLOCALRELEASE:-}" ]]; then + ${HOOKLOCALRELEASE} $(egrep ";${_pkg#*_};" "${BUILDORDER}" | cut -d';' -f6) + fi touch built_ok popd >/dev/null |