2019-02-27 14:22:03 +01:00
|
|
|
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/pkg/$PKGNAME/build"
|
|
|
|
|
|
|
|
if [ -z "$SUBPKG" ]; then
|
|
|
|
SUBPKG="$PKGNAME"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2018-01-25 00:09:29 +01:00
|
|
|
run_pkg_command() {
|
2018-01-24 21:48:10 +01:00
|
|
|
local FUNCTION="$1"
|
2018-02-15 23:47:54 +01:00
|
|
|
local DEPLOYDIR="$PKGDEPLOYDIR/$PKGNAME"
|
|
|
|
local LOGFILE="$PKGLOGDIR/${PKGNAME}-${FUNCTION}.log"
|
2017-12-09 21:51:48 +01:00
|
|
|
local SRC="$PKGSRCDIR/$SRCDIR"
|
|
|
|
|
2018-02-18 17:46:06 +01:00
|
|
|
echo "$PKGNAME - $FUNCTION"
|
|
|
|
|
2018-06-17 13:28:18 +02:00
|
|
|
mkdir -p "$PKGBUILDDIR" "$DEPLOYDIR"
|
2017-12-09 21:51:48 +01:00
|
|
|
|
2018-02-16 18:45:25 +01:00
|
|
|
pushd "$PKGBUILDDIR" > /dev/null
|
2018-06-17 13:28:18 +02:00
|
|
|
$FUNCTION "$SRC" "$DEPLOYDIR" &>> "$LOGFILE" < /dev/null
|
2017-12-09 21:51:48 +01:00
|
|
|
popd > /dev/null
|
|
|
|
|
|
|
|
(rmdir "$DEPLOYDIR" || true) 2> /dev/null ;
|
|
|
|
}
|