1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-14 23:47:11 +01:00
build/util/pkgcmd.sh
David Oberhollenzer 55d13e06fd Make sysroot preparation & packaging overrideable package actions
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2020-04-19 08:41:52 +02:00

26 lines
599 B
Bash

include_pkg() {
PKGNAME="$1" # globally visible package name
unset -f build deploy download prepare check_update package
unset -v VERSION TARBALL URL SRCDIR SHA256SUM DEPENDS SUBPKG
source "$SCRIPTDIR/util/emptypkg.sh"
source "$SCRIPTDIR/pkg/$PKGNAME/build"
if [ -z "$SUBPKG" ]; then
SUBPKG="$PKGNAME"
fi
}
run_pkg_command() {
local FUNCTION="$1"
local LOGFILE="$PKGLOGDIR/${PKGNAME}-${FUNCTION}.log"
local SRC="$PKGSRCDIR/$SRCDIR"
echo "$PKGNAME - $FUNCTION"
pushd "$PKGBUILDDIR" > /dev/null
$FUNCTION "$SRC" &>> "$LOGFILE" < /dev/null
popd > /dev/null
gzip -f "$LOGFILE"
}