mirror of
https://github.com/pygos/build.git
synced 2024-11-14 15:37:11 +01:00
David Oberhollenzer
2dc8bd9cd6
This commit moves the "fetch_package" utility function to the package skeleton and turns it into an overrideable function called "download". Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
38 lines
696 B
Bash
38 lines
696 B
Bash
build_package() {
|
|
found="yes"
|
|
|
|
for f in $SUBPKG; do
|
|
if [ ! -f "$REPODIR/${f}.pkg" ]; then
|
|
found="no"
|
|
break
|
|
fi
|
|
done
|
|
|
|
if [ "x$found" == "xyes" ]; then
|
|
return
|
|
fi
|
|
|
|
for f in $SUBPKG; do
|
|
rm -f "$REPODIR/${f}.pkg"
|
|
done
|
|
|
|
rm -rf "$SYSROOT" "$PKGBUILDDIR" "$PKGDEPLOYDIR"
|
|
mkdir -p "$SYSROOT" "$PKGBUILDDIR" "$PKGDEPLOYDIR"
|
|
|
|
if [ ! -z "$DEPENDS" ]; then
|
|
pkg install -omD $DEPENDS
|
|
fi
|
|
|
|
run_pkg_command "download"
|
|
run_pkg_command "build"
|
|
run_pkg_command "deploy"
|
|
deploy_dev_cleanup
|
|
strip_files ${PKGDEPLOYDIR}/{bin,lib}
|
|
|
|
for f in $SUBPKG; do
|
|
pkg pack -d "$PKGDEPLOYDIR/${f}.desc" \
|
|
-l "$PKGDEPLOYDIR/${f}.files"
|
|
done
|
|
|
|
rm -rf "$SYSROOT" "$PKGBUILDDIR" "$PKGDEPLOYDIR"
|
|
}
|