mirror of
https://github.com/pygos/build.git
synced 2024-11-14 15:37:11 +01:00
David Oberhollenzer
fa4eff263b
This commit adds an "emptypackage" template that implements defaults for all package functions and is included before every package. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
26 lines
582 B
Bash
26 lines
582 B
Bash
include_pkg() {
|
|
PKGNAME="$1" # globally visible package name
|
|
|
|
unset -f build deploy prepare check_update
|
|
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"
|
|
}
|