[Lunar-commits] <lunar-iso> Added iso build makefile

Peter de Ridder peter at lunar-linux.org
Thu Apr 11 00:32:26 CEST 2013


commit 0f307cfac1628009de4c878fb1b6d7f920839b8d
Author: Peter de Ridder <peter at lunar-linux.org>
Date: Mon, 12 Nov 2012 08:25:38 -0800
URL: https://github.com/lunar-linux/lunar-iso/commit/0f307cfac1628009de4c878fb1b6d7f920839b8d

Added iso build makefile
---
  Makefile                            | +1/-0     
  isolinux/boot.cat -> mkfiles/iso.mk
  isolinux/isolinux.bin ->           
  mkfiles/download.mk                 | +2/-2     
  mkfiles/iso.mk                      | +46/-0    
  5 files changed, 49 insertions(+), 2 deletions(-)

--- a/Makefile
+++ b/Makefile
@@ -43,6 +43,7 @@ include mkfiles/stage1.mk
 include mkfiles/stage2.mk
 include mkfiles/pack.mk
 include mkfiles/kernel.mk
+include mkfiles/iso.mk
 
 clean:
 	rm -rf $(ISO_TARGET) $(ISO_SOURCE)/{spool,cache}
--- a/mkfiles/download.mk
+++ b/mkfiles/download.mk
@@ -9,8 +9,8 @@ download: download-lunar
 $(ISO_SOURCE)/spool/moonbase.tar.bz2:
 	@echo download-moonbase
 	@mkdir -p $(ISO_SOURCE)/spool
-	@wget -O $@ "`lsh eval echo '$$MOONBASE_URL'`/moonbase.tar.bz2" \
-	  || { rm $@ ; exit 1 ; }
+	@wget -O $@.tmp "`lsh eval echo '$$MOONBASE_URL'`/moonbase.tar.bz2"
+	@mv $@.tmp $@
 
 
 # note: this installs an empty installed packages list
--- /dev/null
+++ b/mkfiles/iso.mk
@@ -0,0 +1,46 @@
+.INTERMEDIATE: iso iso-tools iso-files iso-isolinux
+
+iso: $(ISO_SOURCE)/lunar-$(ISO_VERSION)-$(ISO_ARCH).iso
+
+
+# Host system iso tools
+iso-tools:
+	@which mkisofs || lin cdrtools
+
+
+# Prepare target files
+$(ISO_TARGET)/etc/lunar.release: stage2-target
+	echo 'DISTRIB_ID="Lunar Linux"'                        > $@
+	echo 'DISTRIB_RELEASE="$(ISO_VERSION)"'               >> $@
+	echo 'DISTRIB_CODENAME="$(ISO_CODENAME)"'             >> $@
+	echo 'DISTRIB_DESCRIPTION="Lunar Linux $(ISO_CNAME)"' >> $@
+	echo "Lunar Linux $(ISO_CNAME)" > $@
+
+iso-files: $(ISO_TARGET)/etc/lunar.release
+
+
+# Copy the isolinux files to the target
+$(ISO_TARGET)/usr/share/syslinux/isolinux.bin: stage2
+	@touch $@
+
+$(ISO_TARGET)/isolinux/isolinux.bin: $(ISO_TARGET)/usr/share/syslinux/isolinux.bin
+	@cp $< $@
+
+$(ISO_TARGET)/.iso-isolinux: stage2-target
+	@cp -r $(ISO_SOURCE)/isolinux $(ISO_TARGET)
+	@touch $@
+
+iso-isolinux: $(ISO_TARGET)/.iso-isolinux $(ISO_TARGET)/isolinux/isolinux.bin
+
+
+# Generate the actual image
+$(ISO_SOURCE)/lunar-$(ISO_VERSION)-$(ISO_ARCH).iso: iso-tools iso-files iso-isolinux
+	mkisofs -o $@.tmp -R -J -l \
+	-V "Lunar-Linux $(ISO_CODENAME)" -v \
+	-d -D -N -no-emul-boot -boot-load-size 4 -boot-info-table \
+	-b isolinux/isolinux.bin \
+	-c isolinux/boot.cat \
+	-m spool -m doc \
+	-A "Lunar-$(ISO_VERSION)" $(ISO_TARGET)
+	#mkhybrid $@.tmp
+	mv $@.tmp $@




More information about the Lunar-commits mailing list