2019-03-09 17:15:58 +01:00
|
|
|
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
|
|
|
|
|
2019-03-16 23:32:59 +01:00
|
|
|
fetch_package
|
|
|
|
|
2019-03-09 17:15:58 +01:00
|
|
|
rm -rf "$TCDIR/$TARGET" "$PKGBUILDDIR" "$PKGDEPLOYDIR"
|
|
|
|
mkdir -p "$TCDIR/$TARGET" "$PKGBUILDDIR" "$PKGDEPLOYDIR"
|
|
|
|
|
|
|
|
if [ ! -z "$DEPENDS" ]; then
|
2019-06-10 15:16:41 +02:00
|
|
|
pkg install -omD $DEPENDS
|
2019-03-09 17:15:58 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
run_pkg_command "build"
|
|
|
|
run_pkg_command "deploy"
|
|
|
|
deploy_dev_cleanup
|
|
|
|
strip_files ${PKGDEPLOYDIR}/{bin,lib}
|
|
|
|
|
|
|
|
for f in $SUBPKG; do
|
2019-06-10 15:16:41 +02:00
|
|
|
pkg pack -d "$PKGDEPLOYDIR/${f}.desc" \
|
2019-03-09 17:15:58 +01:00
|
|
|
-l "$PKGDEPLOYDIR/${f}.files"
|
|
|
|
done
|
|
|
|
|
|
|
|
rm -rf "$TCDIR/$TARGET" "$PKGBUILDDIR" "$PKGDEPLOYDIR"
|
|
|
|
}
|