1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-21 18:49:46 +01:00

cleanup: move rest of pkgcmd into build_pacakge

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
David Oberhollenzer 2020-04-19 08:38:28 +02:00
parent 55d13e06fd
commit 5fc1a2f138
3 changed files with 27 additions and 27 deletions

1
mk.sh
View file

@ -46,7 +46,6 @@ popd > /dev/null
export BUILD_PATH_PREFIX_MAP="$PKGSRCDIR=src:$BUILDROOT=build"
############################# include utilities ##############################
source "$SCRIPTDIR/util/pkgcmd.sh"
source "$SCRIPTDIR/util/override.sh"
source "$SCRIPTDIR/util/autotools.sh"
source "$SCRIPTDIR/util/build_package.sh"

View file

@ -1,3 +1,30 @@
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"
}
build_package() {
found="yes"

View file

@ -1,26 +0,0 @@
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"
}