mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.9 KiB

  1. # This is the shortest possible target build.sh script. Some targets will
  2. # add code after calling pkgloop() or modify pkgloop's behavior by defining
  3. # a new pkgloop_action() function.
  4. #
  5. pkgloop
  6. echo_header "Finishing build."
  7. echo_status "Selecting bin packages ..."
  8. rm -rf build/${ROCKCFG_ID}/ROCK/pkgs_sel
  9. mkdir -p build/${ROCKCFG_ID}/ROCK/pkgs_sel
  10. (cd build/${ROCKCFG_ID}/ROCK/pkgs/;
  11. ls | xargs ln --target-directory="../pkgs_sel";)
  12. # :doc packages are nice but in most cases never used
  13. (cd build/${ROCKCFG_ID}/ROCK/pkgs_sel/; rm -f *:doc{-*,}.gem;)
  14. # remove packages which haven't been built in stages 0-8
  15. if [ "$ROCKCFG_TARGET_CRYSTAL_BUILDADDONS" = 1 ]; then
  16. for gemfile in build/${ROCKCFG_ID}/ROCK/pkgs_sel/*.gem; do
  17. if ! mine -k packages $gemfile | grep -q '^Build \[[0-8]\] at '; then
  18. rm -f $gemfile
  19. fi
  20. done
  21. fi
  22. echo_status "Creating package database (everything) ..."
  23. admdir="build/${ROCKCFG_ID}/var/adm"
  24. create_package_db $admdir build/${ROCKCFG_ID}/ROCK/pkgs \
  25. build/${ROCKCFG_ID}/ROCK/pkgs/packages.db
  26. echo_status "Creating package database (install media) ..."
  27. admdir="build/${ROCKCFG_ID}/var/adm"
  28. create_package_db $admdir build/${ROCKCFG_ID}/ROCK/pkgs_sel \
  29. build/${ROCKCFG_ID}/ROCK/pkgs_sel/packages.db
  30. echo_status "Creating isofs.txt file .."
  31. cat << EOT > build/${ROCKCFG_ID}/ROCK/isofs.txt
  32. DISK1 $admdir/cache/ ${ROCKCFG_SHORTID}/info/cache/
  33. DISK1 $admdir/cksums/ ${ROCKCFG_SHORTID}/info/cksums/
  34. DISK1 $admdir/dependencies/ ${ROCKCFG_SHORTID}/info/dependencies/
  35. DISK1 $admdir/descs/ ${ROCKCFG_SHORTID}/info/descs/
  36. DISK1 $admdir/flists/ ${ROCKCFG_SHORTID}/info/flists/
  37. DISK1 $admdir/md5sums/ ${ROCKCFG_SHORTID}/info/md5sums/
  38. DISK1 $admdir/packages/ ${ROCKCFG_SHORTID}/info/packages/
  39. EVERY build/${ROCKCFG_ID}/ROCK/pkgs_sel/packages.db ${ROCKCFG_SHORTID}/pkgs/packages.db
  40. SPLIT build/${ROCKCFG_ID}/ROCK/pkgs_sel/ ${ROCKCFG_SHORTID}/pkgs/
  41. EOT