Build environment for making Devuan installer ISOs for i386 and amd64.
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.
 
 
 
 
 
 

87 lines
2.2 KiB

  1. # This Makefile fragment defines how to pack the pieces of an ISO
  2. # into an actual ISO image.
  3. # env ISO
  4. # env ISOTREE
  5. # env DISTNAME
  6. # env DISTVERSION
  7. # env ARCH
  8. # env BUILD_DATE
  9. VOLI = Devuan ${DISTVERSION} # ${BUILD_DATE}
  10. APPI = Devuan ${DISTNAME} ${DISTVERSION}
  11. ${warning ${VOLI} = ${APPI}}
  12. ISOCONTENT = pool.${POOL} ${BOOTOPTIONS} ${FIRMWARE} ${DOCS} ${META} ${MD5SUM}
  13. META += ${ISOTREE}/.disk/info
  14. ifneq (${IS_INSTALLER},)
  15. DOCS = ${INSTALLGUIDE}
  16. META += ${ISOTREE}/.disk/base_installable
  17. META += ${ISOTREE}/.disk/cd_type
  18. META += ${ISOTREE}/debian
  19. META +=${ISOTREE}/devuan
  20. ${ISOTREE}/.disk/cd_type:
  21. echo ${IS_INSTALLER} > $@
  22. endif
  23. MD5SUM = ${ISOTREE}/md5sum.txt
  24. MD5SUM = MD5TMP
  25. # Making the .disk/info file
  26. DISKINFO = Devuan GNU/Linux ${DISTVERSION}
  27. DISKINFO += (${DISTNAME}) ${ARCH}
  28. DISKINFO += - ${ISO} $(BUILD_DATE)
  29. ${ISOTREE}/.disk/info: ${ISOTREE}/.disk/
  30. echo -n "${DISKINFO}" > $@
  31. # Making the .disk/base_installable file
  32. ${ISOTREE}/.disk/base_installable: ${ISOTREE}/.disk/
  33. touch $@
  34. # Making the debian and devuan links
  35. ${ISOTREE}/debian ${ISOTREE}/devuan: ${ISOTREE}/.disk/
  36. ln -s . $@
  37. # Making the disk's md5sum
  38. MD5SUM = ${ISOTREE}/md5sum.txt
  39. MD5TMP = MD5TMP
  40. MD5CMD = (cd ${ISOTREE} ; (find . -type f -printf "%P\0" | xargs -0 md5sum))
  41. .INTERMEDIATE: ${MD5TMP}
  42. ${MD5TMP}:
  43. ${MD5CMD} > $@
  44. ${MD5SUM}: ${MD5TMP}
  45. sed '/^isolinux.bin$$/d' ${MD5TMP} > $@
  46. # Making installer documentation by copying from "docs/"
  47. INSTALLGUIDESRC := ${shell find docs -type f | grep -v .gitkeep}
  48. INSTALLGUIDE = ${patsubst docs/%,${ISOTREE}/%,${INSTALLGUIDESRC}}
  49. ${INSTALLGUIDE}: ${ISOTREE}/%: docs/%
  50. mkdir -p $$(dirname $@)
  51. cp $< $@
  52. # Make an ISO from a populated ${ISOTREE}
  53. XORRISO = xorriso -as mkisofs -r -J -no-emul-boot
  54. XORRISO += -A "${APPI}" -V "${VOLI}" -volset "${ISO}"
  55. XORRISO += -publisher "${DISTPUBLISHER}" -p "${DISTPUBLISHER}"
  56. ifneq (${BOOTBIN},)
  57. XORRISO += -b ${BOOTBIN} -c boot.cat -boot-load-size 4 -boot-info-table
  58. endif
  59. ifneq (${EFIIMG},)
  60. XORRISO += -eltorito-alt-boot --efi-boot ${EFIIMG}
  61. endif
  62. ${ISO}-${ARCH}.iso: ${ISOCONTENT}
  63. ${XORRISO} -o $@ ${ISOTREE}
  64. ifneq (${EFIIMG},)
  65. isohybrid -h 64 -s 32 -u --uefi $@
  66. endif
  67. #add-firmware-partition $@
  68. # Implements the "build" target
  69. PHONY: build
  70. build: ${ISO}-${ARCH}.iso save-run