]> git.ipfire.org Git - ipfire-3.x.git/blob - lfs/cdrom
Moved the so called "rootfiles" to another location.
[ipfire-3.x.git] / lfs / cdrom
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007 Michael Tremer & Christian Schmidt #
5 # #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
10 # #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
15 # #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
18 # #
19 ###############################################################################
20
21 ###############################################################################
22 # Definitions
23 ###############################################################################
24
25 include Config
26
27 VER = ipfire
28
29 THISAPP = cdrom
30 TARGET = $(DIR_INFO)/$(STAGE_ORDER)_$(STAGE)/$(THISAPP)
31
32 ###############################################################################
33 # Top-level Rules
34 ###############################################################################
35
36 install : $(TARGET)
37
38 download :
39
40 ###############################################################################
41 # Installation Details
42 ###############################################################################
43
44 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
45 @rm -rf $(CDROM_DIR)/*
46
47 mkdir -p $(CDROM_DIR)/{boot/grub,doc,grub}
48
49 ### Compress root fs
50 #
51 cd / && find $(DIR_SOURCE)/rootfiles/core -maxdepth 1 -type f | xargs cat | \
52 sed -e "s/KVER/$(KVER)/g" | grep -v '#' | sort | uniq | cpio -o -H newc | \
53 lzma e -si -so > $(CDROM_DIR)/$(SNAME)-$(VERSION).img
54
55 # Other files
56 sed 's/VERSION/$(VERSION)/' $(DIR_CONF)/cdrom/README.txt > $(CDROM_DIR)/README.txt
57 cp $(DIR_SRC)/doc/COPYING $(CDROM_DIR)
58 cp $(DIR_SRC)/doc/{ChangeLog,packages-list.txt} $(CDROM_DIR)/doc
59
60 cp $(IMAGES_DIR)/initramfs-$(VERSION).img $(CDROM_DIR)/boot/grub/initramfs.img
61 cp /boot/ipfirekernel-$(KVER) $(CDROM_DIR)/boot/grub/ipfirekernel
62
63 cp /usr/lib/grub/i386-pc/stage2_eltorito $(CDROM_DIR)/boot/grub/stage2_eltorito
64 #cp $(DIR_CONF)/grub/installer.conf $(CDROM_DIR)/boot/grub/grub.conf
65 #cp $(DIR_CONF)/grub/ipfire.xpm.gz $(CDROM_DIR)/boot/grub/ipfire.xpm.gz
66
67 #cp /usr/lib/memtest86+/memtest.bin $(CDROM_DIR)/boot/grub/memtest
68
69 cd $(CDROM_DIR) && mkisofs -J -r -V "$(NAME)_$(VERSION)" \
70 -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table \
71 . > $(IMAGES_DIR)/$(SNAME)-$(VERSION).$(MACHINE)-$(ED).iso
72
73 @rm -rf $(CDROM_DIR)/*
74
75 ### REBUILD THIS AT EVERY PASS