mirror of
https://github.com/pygos/build.git
synced 2024-06-29 06:20:12 +02:00
David Oberhollenzer
2c741e06f3
Same process as for the build dir. We have one intermediate deploy directory that the packaes installs it self to, then we package the contents, finally we nuke the build and deploy directory before starting with the next package. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
26 lines
581 B
Bash
26 lines
581 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/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"
|
|
|
|
mkdir -p "$PKGBUILDDIR" "$PKGDEPLOYDIR"
|
|
|
|
pushd "$PKGBUILDDIR" > /dev/null
|
|
$FUNCTION "$SRC" "$PKGDEPLOYDIR" &>> "$LOGFILE" < /dev/null
|
|
popd > /dev/null
|
|
}
|