[Lunar-commits] <lunar-iso> make the iso fit a cd

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


commit 889989ff503f5aeb929e8aaff1e7730e01eef03b
Author: Peter de Ridder <peter at lunar-linux.org>
Date: Sat, 24 Nov 2012 11:56:12 -0800
URL: https://github.com/lunar-linux/lunar-iso/commit/889989ff503f5aeb929e8aaff1e7730e01eef03b

make the iso fit a cd
---
  mkfiles/iso.mk  | +18/-8    
  mkfiles/pack.mk | +3/-0     
  2 files changed, 21 insertions(+), 8 deletions(-)

--- a/mkfiles/iso.mk
+++ b/mkfiles/iso.mk
@@ -1,6 +1,6 @@
-.INTERMEDIATE: iso iso-target iso-modules iso-tools iso-files iso-isolinux
+.INTERMEDIATE: iso iso-target iso-modules iso-tools iso-files iso-strip iso-isolinux
 
-iso: $(ISO_SOURCE)/lunar-$(ISO_VERSION)-$(ISO_ARCH).iso
+iso: $(ISO_SOURCE)/lunar-$(ISO_VERSION).iso
 
 
 # Clean stage2 markers and mark the start of iso
@@ -30,10 +30,11 @@ iso-modules: $(ISO_TARGET)/.iso-modules
 
 # Prepare target files
 $(ISO_TARGET)/etc/lsb-release: iso-modules
-	{ echo 'DISTRIB_ID="Lunar Linux"' ; \
-	  echo 'DISTRIB_RELEASE="$(ISO_VERSION)"' ; \
-	  echo 'DISTRIB_CODENAME="$(ISO_CODENAME)"' ; \
-	  echo 'DISTRIB_DESCRIPTION="Lunar Linux $(ISO_CNAME)"' ; } > $@
+	@echo lsb-release
+	@{ echo 'DISTRIB_ID="Lunar Linux"' ; \
+	   echo 'DISTRIB_RELEASE="$(ISO_VERSION)"' ; \
+	   echo 'DISTRIB_CODENAME="$(ISO_CODENAME)"' ; \
+	   echo 'DISTRIB_DESCRIPTION="Lunar Linux $(ISO_CNAME)"' ; } > $@
 
 $(ISO_TARGET)/etc/fstab: $(ISO_SOURCE)/livecd/template/etc/fstab iso-modules
 	@cp $< $@
@@ -41,6 +42,15 @@ $(ISO_TARGET)/etc/fstab: $(ISO_SOURCE)/livecd/template/etc/fstab iso-modules
 iso-files: $(ISO_TARGET)/etc/lsb-release $(ISO_TARGET)/etc/fstab
 
 
+# Strip executables and libraries
+$(ISO_TARGET)/.iso-strip: iso-modules
+	@echo iso-strip
+	@find \( -type f -perm /u=x -o -name 'lib*.so*' \) -exec strip {} \;
+	@touch $@
+
+iso-strip: $(ISO_TARGET)/.iso-strip
+
+
 # Copy the isolinux files to the target
 $(ISO_TARGET)/usr/share/syslinux/isolinux.bin: $(ISO_TARGET)/.iso-isolinux
 	@touch $@
@@ -56,7 +66,7 @@ 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
+$(ISO_SOURCE)/lunar-$(ISO_VERSION).iso: iso-tools iso-files iso-isolinux iso-strip
 	mkisofs -o $@.tmp -R -J -l \
 		-V "Lunar-Linux_`echo -n $(ISO_CODENAME) | tr '[:space:]' _`" -v \
 	-d -D -N -no-emul-boot -boot-load-size 4 -boot-info-table \
@@ -69,6 +79,7 @@ $(ISO_SOURCE)/lunar-$(ISO_VERSION)-$(ISO_ARCH).iso: iso-tools iso-files iso-isol
 	-m '$(ISO_TARGET)/var/spool/*' \
 	-m '$(ISO_TARGET)/var/log/*' \
 	-m '$(ISO_TARGET)/root/*' \
+	-m '$(ISO_TARGET)/usr/lib/locale' \
 	-m '$(ISO_TARGET)/usr/share/locale' \
 	-m '$(ISO_TARGET)/usr/share/man' \
 	-m '$(ISO_TARGET)/usr/share/info' \
@@ -76,7 +87,6 @@ $(ISO_SOURCE)/lunar-$(ISO_VERSION)-$(ISO_ARCH).iso: iso-tools iso-files iso-isol
 	-m '$(ISO_TARGET)/usr/include' \
 	-m '$(ISO_TARGET)/usr/src' \
 	-m '$(ISO_TARGET)/var/state/lunar/module_history' \
-	-m 'lib*.a' \
 	-m 'doc' \
 	-A "Lunar-$(ISO_VERSION)" $(ISO_TARGET)
 	#mkhybrid $@.tmp
--- a/mkfiles/pack.mk
+++ b/mkfiles/pack.mk
@@ -15,10 +15,13 @@ $(ISO_TARGET)/.aaa_base.found: stage2
 	-path '$(ISO_TARGET)/root' -o \
 	-path '$(ISO_TARGET)/sys' -o \
 	-path '$(ISO_TARGET)/tmp' -o \
+	-path '$(ISO_TARGET)/boot' -o \
+	-path '$(ISO_TARGET)/lib/modules' -o \
 	-path '$(ISO_TARGET)/usr/include' -o \
 	-path '$(ISO_TARGET)/usr/lib' -o \
 	-path '$(ISO_TARGET)/usr/libexec' -o \
 	-path '$(ISO_TARGET)/usr/share' -o \
+	-path '$(ISO_TARGET)/usr/src' -o \
 	-path '$(ISO_TARGET)/var/cache' -o \
 	-path '$(ISO_TARGET)/var/lib/lunar' -o \
 	-path '$(ISO_TARGET)/var/log' -o \




More information about the Lunar-commits mailing list