diff --git a/target/crystal/build.sh b/target/crystal/build.sh index d3c853008..10817ee14 100644 --- a/target/crystal/build.sh +++ b/target/crystal/build.sh @@ -15,6 +15,15 @@ ln build/${ROCKCFG_ID}/ROCK/pkgs/* build/${ROCKCFG_ID}/ROCK/pkgs_sel/ # :doc packages are nice but in most cases never used rm -f build/${ROCKCFG_ID}/ROCK/pkgs_sel/*:doc{-*,}.gem +# remove packages which haven't been built in stages 0-8 +if [ "$ROCKCFG_TARGET_CRYSTAL_BUILDADDONS" = 1 ]; then + for gemfile in build/${ROCKCFG_ID}/ROCK/pkgs_sel/*.gem; do + if ! mine -k descs $gemfile | grep '^\[P\]' | cut -f3 -d' ' | grep -q '[0-8]'; then + rm -f $gemfile + fi + done +fi + echo_status "Creating package database ..." admdir="build/${ROCKCFG_ID}/var/adm" create_package_db $admdir build/${ROCKCFG_ID}/ROCK/pkgs_sel \ diff --git a/target/crystal/config.in b/target/crystal/config.in index 44aba116d..f966f47e0 100644 --- a/target/crystal/config.in +++ b/target/crystal/config.in @@ -20,7 +20,18 @@ # # --- ROCK-COPYRIGHT-NOTE-END --- -pkgfilter sed -e '/CORE/ ! s/^X/O/' -ROCKCFGSET_DO_REBUILD_STAGE=0 +bool 'Also build the add-on packages for network install' \ + ROCKCFG_TARGET_CRYSTAL_BUILDADDONS 0 + +if [ $ROCKCFG_TARGET_CRYSTAL_BUILDADDONS = 1 ] +then + pkgfilter sed \ + -e '/CORE/ s/^\(. .........\)./\1-/' \ + -e '/CORE/ ! s/^\(.\) .........\(.\)/\1 ---------\2/' +else + pkgfilter sed -e '/CORE/ ! s/^X/O/' + ROCKCFGSET_DO_REBUILD_STAGE=0 +fi + ROCKCFGSET_PKG_SUBVERSION_STATIC=0