]>
Commit | Line | Data |
---|---|---|
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)/$(THISAPP) | |
31 | ||
32 | ############################################################################### | |
33 | # Top-level Rules | |
34 | ############################################################################### | |
35 | ||
36 | install : $(TARGET) | |
37 | ||
38 | check : | |
39 | ||
40 | download : | |
41 | ||
42 | md5 : | |
43 | ||
44 | ############################################################################### | |
45 | # Installation Details | |
46 | ############################################################################### | |
47 | ||
48 | $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) | |
49 | rm -rf /install/cdrom /tmp/* | |
50 | ||
51 | # Compress root filesystem | |
52 | # Reason for this tar+untar+tar is removing of entries listed two or more in src/ROOTFILES | |
53 | mkdir -p /install/cdrom/doc | |
54 | find $(DIR_SRC)/config/rootfiles/common -maxdepth 1 -type f | xargs cat >> /tmp/ROOTFILES | |
55 | find $(DIR_SRC)/config/rootfiles/ver_$(ED) -maxdepth 1 -type f | xargs cat >> /tmp/ROOTFILES | |
56 | find $(DIR_SRC)/config/rootfiles/core/*/files -maxdepth 1 -type f | xargs cat >> /tmp/ROOTFILES | |
57 | sed -e "s/KVER/$(KVER)/g" -i /tmp/ROOTFILES | |
58 | ||
59 | tar -c -C / --files-from=/tmp/ROOTFILES \ | |
60 | -f /$(SNAME).tar --exclude='#*' --exclude='dev/pts/*' \ | |
61 | --exclude='proc/*' --exclude='tmp/ROOTFILES' | |
62 | rm -f /tmp/ROOTFILES | |
63 | tar -x -C /tmp -f /$(SNAME).tar | |
64 | rm -f /$(SNAME).tar | |
65 | @mkdir /tmp/sys | |
66 | cd /tmp && tar jcf /install/cdrom/$(SNAME)-$(VERSION).tbz2 * && rm -rf * | |
67 | ||
68 | # Other files | |
69 | sed 's/VERSION/$(VERSION)/' $(DIR_SRC)/config/cdrom/README.txt > /install/cdrom/README.txt | |
70 | cp $(DIR_SRC)/doc/COPYING /install/cdrom/ | |
71 | cp $(DIR_SRC)/doc/{ChangeLog,packages-list.txt} /install/cdrom/doc | |
72 | ||
73 | # Configuration | |
74 | mkdir -p /install/cdrom/boot | |
75 | cp $(DIR_SRC)/config/syslinux/unattended.conf /install/cdrom/boot/unattended.conf | |
76 | ||
77 | # Make the ISO | |
78 | mkdir -p /install/cdrom/boot/isolinux; \ | |
79 | dd if=/dev/zero bs=1k count=2 > /install/cdrom/boot/isolinux/boot.catalog; \ | |
80 | cp /install/images/initrd /install/cdrom/boot/isolinux/instroot; \ | |
81 | cp /boot/vmlinuz-$(KVER)-ipfire /install/cdrom/boot/isolinux/vmlinuz; \ | |
82 | cp $(DIR_SRC)/config/syslinux/syslinux.cfg /install/cdrom/boot/isolinux/isolinux.cfg; \ | |
83 | cp $(DIR_SRC)/config/syslinux/boot.msg /install/cdrom/boot/isolinux/boot.msg; \ | |
84 | cp $(DIR_SRC)/config/syslinux/options.msg /install/cdrom/boot/isolinux/options.msg; \ | |
85 | cp $(DIR_SRC)/config/syslinux/splash.lss /install/cdrom/boot/isolinux/splash.lss; \ | |
86 | cp /usr/lib/memtest86+/memtest.bin /install/cdrom/boot/isolinux/memtest; \ | |
87 | cp /usr/lib/syslinux/isolinux.bin /install/cdrom/boot/isolinux/isolinux.bin; \ | |
88 | cd /install/cdrom && find -type f ! -name md5sum.txt | grep -v "./boot" | \ | |
89 | xargs md5sum > md5sum.txt; \ | |
90 | cd /install/cdrom && mkisofs -J -r -V "$(NAME)_$(VERSION)" \ | |
91 | -b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table \ | |
92 | -c boot/isolinux/boot.catalog . > /install/images/$(SNAME)-$(VERSION).$(MACHINE)-$(ED)-core$(CORE).iso |