mirror of
https://github.com/pygos/build.git
synced 2024-11-22 11:09:46 +01:00
cleanup: use package files instead of source package dotfiles
Try to build a source package if at least one binary package is missing. If that is the case, clean up possibly built packages so we can cleanly recover from a prior crash. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
parent
2184f4dae7
commit
a9eb892920
1 changed files with 28 additions and 18 deletions
46
mk.sh
46
mk.sh
|
@ -89,31 +89,41 @@ done < "$PACKAGELIST"
|
||||||
echo "--- building packages ---"
|
echo "--- building packages ---"
|
||||||
|
|
||||||
while read pkg; do
|
while read pkg; do
|
||||||
if [ ! -e "$PKGLOGDIR/.$pkg" ]; then
|
include_pkg "$pkg"
|
||||||
include_pkg "$pkg"
|
|
||||||
|
|
||||||
rm -rf "$TCDIR/$TARGET" "$PKGBUILDDIR" "$PKGDEPLOYDIR"
|
found="yes"
|
||||||
mkdir -p "$TCDIR/$TARGET" "$PKGBUILDDIR" "$PKGDEPLOYDIR"
|
|
||||||
|
|
||||||
if [ ! -z "$DEPENDS" ]; then
|
for f in $SUBPKG; do
|
||||||
pkg install -omD -r "$TCDIR/$TARGET" -R "$REPODIR" $DEPENDS
|
if [ ! -f "$REPODIR/${f}.pkg" ]; then
|
||||||
|
found="no"
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
run_pkg_command "build"
|
[ "x$found" == "xno" ] || continue;
|
||||||
run_pkg_command "deploy"
|
|
||||||
deploy_dev_cleanup
|
|
||||||
strip_files ${PKGDEPLOYDIR}/{bin,lib}
|
|
||||||
|
|
||||||
for f in $SUBPKG; do
|
for f in $SUBPKG; do
|
||||||
pkg pack -r "$REPODIR" \
|
rm -f "$REPODIR/${f}.pkg"
|
||||||
-d "$PKGDEPLOYDIR/${f}.desc" \
|
done
|
||||||
-l "$PKGDEPLOYDIR/${f}.files"
|
|
||||||
done
|
|
||||||
|
|
||||||
rm -rf "$TCDIR/$TARGET" "$PKGBUILDDIR" "$PKGDEPLOYDIR"
|
rm -rf "$TCDIR/$TARGET" "$PKGBUILDDIR" "$PKGDEPLOYDIR"
|
||||||
touch "$PKGLOGDIR/.$pkg"
|
mkdir -p "$TCDIR/$TARGET" "$PKGBUILDDIR" "$PKGDEPLOYDIR"
|
||||||
|
|
||||||
|
if [ ! -z "$DEPENDS" ]; then
|
||||||
|
pkg install -omD -r "$TCDIR/$TARGET" -R "$REPODIR" $DEPENDS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
run_pkg_command "build"
|
||||||
|
run_pkg_command "deploy"
|
||||||
|
deploy_dev_cleanup
|
||||||
|
strip_files ${PKGDEPLOYDIR}/{bin,lib}
|
||||||
|
|
||||||
|
for f in $SUBPKG; do
|
||||||
|
pkg pack -r "$REPODIR" -d "$PKGDEPLOYDIR/${f}.desc" \
|
||||||
|
-l "$PKGDEPLOYDIR/${f}.files"
|
||||||
|
done
|
||||||
|
|
||||||
|
rm -rf "$TCDIR/$TARGET" "$PKGBUILDDIR" "$PKGDEPLOYDIR"
|
||||||
done < "$PACKAGELIST"
|
done < "$PACKAGELIST"
|
||||||
|
|
||||||
echo "--- done ---"
|
echo "--- done ---"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue