############################################################################### # # # IPFire.org - A linux based firewall # # Copyright (C) 2007 Michael Tremer & Christian Schmidt # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # # the Free Software Foundation, either version 3 of the License, or # # (at your option) any later version. # # # # This program is distributed in the hope that it will be useful, # # but WITHOUT ANY WARRANTY; without even the implied warranty of # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # # GNU General Public License for more details. # # # # You should have received a copy of the GNU General Public License # # along with this program. If not, see . # # # ############################################################################### ############################################################################### # Definitions ############################################################################### include Config VER = ipfire THISAPP = cdrom TARGET = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP) ############################################################################### # Top-level Rules ############################################################################### install : $(TARGET) download : ############################################################################### # Installation Details ############################################################################### $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @rm -rf $(CDROM_DIR)/* mkdir -p $(CDROM_DIR)/{boot/grub,doc} ### Compressing root fs # find $(DIR_SOURCE)/rootfiles/core -maxdepth 1 -type f | xargs cat | \ grep -v ^# | sed -e "s/KVER/$(KVER)/g" | sort | uniq > $(CDROM_DIR)/archive.files cd / && cpio -o -H newc < $(CDROM_DIR)/archive.files \ > $(CDROM_DIR)/$(SNAME)-$(VERSION).img.tmp 2>$(CDROM_DIR)/archive.errors @cat $(CDROM_DIR)/archive.errors if grep "No such file or directory" < $(CDROM_DIR)/archive.errors; then \ exit 1; \ fi lzma e $(CDROM_DIR)/$(SNAME)-$(VERSION).img.tmp \ $(CDROM_DIR)/$(SNAME)-$(VERSION).img # These files won't be included in the iso @rm -f $(CDROM_DIR)/archive.{files,errors} $(CDROM_DIR)/$(SNAME)-$(VERSION).img.tmp # Other files sed 's/VERSION/$(VERSION)/' $(DIR_CONF)/cdrom/README.txt > $(CDROM_DIR)/README.txt cp $(DIR_SRC)/doc/COPYING $(CDROM_DIR) cp $(DIR_SRC)/doc/{ChangeLog,packages-list.txt} $(CDROM_DIR)/doc cp $(IMAGES_DIR)/initramfs-$(VERSION).img $(CDROM_DIR)/boot/initramfs.img cp /boot/ipfirekernel-$(KVER) $(CDROM_DIR)/boot/ipfirekernel cp /usr/lib/grub/i386-pc/stage2_eltorito $(CDROM_DIR)/boot/grub/stage2_eltorito cp $(DIR_CONF)/grub/installer.conf $(CDROM_DIR)/boot/grub/grub.conf cp $(DIR_CONF)/grub/ipfire.xpm.gz $(CDROM_DIR)/boot/grub/ipfire.xpm.gz cp /usr/lib/memtest86+/memtest.bin $(CDROM_DIR)/boot/memtest cd $(CDROM_DIR) && mkisofs -J -r -V "$(NAME)_$(VERSION)" \ -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table \ . > $(IMAGES_DIR)/$(SNAME)-$(VERSION).$(MACHINE).iso @rm -rf $(CDROM_DIR)/* ### REBUILD THIS AT EVERY PASS