mirror of
https://github.com/pygos/build.git
synced 2024-11-24 20:10:42 +01:00
cleanup: move rest of pkgcmd into build_pacakge
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
parent
55d13e06fd
commit
5fc1a2f138
3 changed files with 27 additions and 27 deletions
1
mk.sh
1
mk.sh
|
@ -46,7 +46,6 @@ popd > /dev/null
|
||||||
export BUILD_PATH_PREFIX_MAP="$PKGSRCDIR=src:$BUILDROOT=build"
|
export BUILD_PATH_PREFIX_MAP="$PKGSRCDIR=src:$BUILDROOT=build"
|
||||||
|
|
||||||
############################# include utilities ##############################
|
############################# include utilities ##############################
|
||||||
source "$SCRIPTDIR/util/pkgcmd.sh"
|
|
||||||
source "$SCRIPTDIR/util/override.sh"
|
source "$SCRIPTDIR/util/override.sh"
|
||||||
source "$SCRIPTDIR/util/autotools.sh"
|
source "$SCRIPTDIR/util/autotools.sh"
|
||||||
source "$SCRIPTDIR/util/build_package.sh"
|
source "$SCRIPTDIR/util/build_package.sh"
|
||||||
|
|
|
@ -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() {
|
build_package() {
|
||||||
found="yes"
|
found="yes"
|
||||||
|
|
||||||
|
|
|
@ -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"
|
|
||||||
}
|
|
Loading…
Reference in a new issue