]>
Commit | Line | Data |
---|---|---|
cd1a2927 MT |
1 | ############################################################################### |
2 | # This file is part of the IPCop Firewall. # | |
3 | # # | |
4 | # IPCop is free software; you can redistribute it and/or modify # | |
5 | # it under the terms of the GNU General Public License as published by # | |
6 | # the Free Software Foundation; either version 2 of the License, or # | |
7 | # (at your option) any later version. # | |
8 | # # | |
9 | # IPCop is distributed in the hope that it will be useful, # | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of # | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # | |
12 | # GNU General Public License for more details. # | |
13 | # # | |
14 | # You should have received a copy of the GNU General Public License # | |
15 | # along with IPCop; if not, write to the Free Software # | |
16 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # | |
17 | # # | |
18 | # Makefiles are based on LFSMake, which is # | |
19 | # Copyright (C) 2002 Rod Roard <rod@sunsetsystems.com> # | |
20 | # # | |
cd1a2927 MT |
21 | ############################################################################### |
22 | ||
23 | ############################################################################### | |
24 | # Definitions | |
25 | ############################################################################### | |
26 | ||
27 | include Config | |
28 | ||
29 | THISAPP = cdrom | |
30 | DL_FILE = rawrite.exe | |
f417cab6 | 31 | DL_FROM = $(URL_IPFIRE) |
cd1a2927 MT |
32 | TARGET = $(DIR_INFO)/$(THISAPP) |
33 | ||
34 | ############################################################################### | |
35 | # Top-level Rules | |
36 | ############################################################################### | |
37 | ||
38 | objects = $(DL_FILE) \ | |
39 | rawwritewin-0.7.zip \ | |
40 | install-en-1.4.0.pdf.zip \ | |
03ad5f93 | 41 | quickstart-en.pdf.zip |
cd1a2927 MT |
42 | |
43 | $(DL_FILE) = $(DL_FROM)/$(DL_FILE) | |
44 | rawwritewin-0.7.zip = http://uranus.it.swin.edu.au/~jn/linux/rawwritewin-0.7.zip | |
45 | install-en-1.4.0.pdf.zip = $(URL_SFNET)/ipcop/install-en-1.4.0.pdf.zip | |
cd1a2927 | 46 | quickstart-en.pdf.zip = http://www.ipcop.org/1.4.0/en/quickstart/quickstart-en.pdf.zip |
cd1a2927 MT |
47 | |
48 | $(DL_FILE)_MD5 = 7dac6ea496014d32dbce6c50feb254ca | |
49 | rawwritewin-0.7.zip_MD5 = 0130b497c8c3bc7d136a4236b0d9fbf6 | |
50 | install-en-1.4.0.pdf.zip_MD5 = 07e0b5131f1434010d8a00571f9acd81 | |
cd1a2927 | 51 | quickstart-en.pdf.zip_MD5 = ca77ef5f1efca6bc519cc42acfd69aa4 |
cd1a2927 MT |
52 | |
53 | install : $(TARGET) | |
54 | ||
55 | check : $(patsubst %,$(DIR_CHK)/%,$(objects)) | |
56 | ||
57 | download :$(patsubst %,$(DIR_DL)/%,$(objects)) | |
58 | ||
59 | md5 : $(subst %,%_MD5,$(objects)) | |
60 | ||
61 | ############################################################################### | |
62 | # Downloading, checking, md5sum | |
63 | ############################################################################### | |
64 | ||
65 | $(patsubst %,$(DIR_CHK)/%,$(objects)) : | |
66 | @$(CHECK) | |
67 | ||
68 | $(patsubst %,$(DIR_DL)/%,$(objects)) : | |
69 | @$(LOAD) | |
70 | ||
71 | $(subst %,%_MD5,$(objects)) : | |
72 | @$(MD5) | |
73 | ||
74 | ############################################################################### | |
75 | # Installation Details | |
76 | ############################################################################### | |
77 | ||
78 | $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) | |
79 | rm -rf /install/cdrom /tmp/* | |
80 | ||
81 | # Compress root filesystem | |
82 | # Reason for this tar+untar+tar is removing of entries listed two or more in src/ROOTFILES | |
83 | mkdir -p /install/cdrom/{doc,dosutils,images} | |
03ad5f93 MT |
84 | find $(DIR_SRC)/config/rootfiles -type f -maxdepth 1 | xargs cat >> /tmp/ROOTFILES |
85 | find $(DIR_SRC)/config/rootfiles/ver_$(IPFVER) -type f -maxdepth 1 | xargs cat >> /tmp/ROOTFILES | |
50f96334 | 86 | tar -c -C / --files-from=/tmp/ROOTFILES \ |
90c973a6 MT |
87 | -f /$(SNAME).tar --exclude='#*' --exclude='dev/pts/*' \ |
88 | --exclude='proc/*' --exclude='tmp/ROOTFILES' | |
50f96334 | 89 | rm -f /tmp/ROOTFILES |
cd1a2927 MT |
90 | tar -x -C /tmp -f /$(SNAME).tar |
91 | rm -f /$(SNAME).tar | |
03ad5f93 MT |
92 | cd /tmp && tar jcf /install/cdrom/$(SNAME)-$(VERSION).tbz2 * && rm -rf * |
93 | ||
cd1a2927 | 94 | # Other files |
03ad5f93 MT |
95 | sed 's/VERSION/$(VERSION)/' $(DIR_SRC)/config/cdrom/README.txt > /install/cdrom/README.txt |
96 | cp $(DIR_SRC)/doc/COPYING /install/cdrom/ | |
97 | cp /install/images/*.img /install/cdrom/images | |
98 | unzip $(DIR_DL)/install-en-1.4.0.pdf.zip -d /install/cdrom/doc | |
99 | unzip $(DIR_DL)/quickstart-en.pdf.zip -d /install/cdrom/doc | |
100 | cp $(DIR_SRC)/doc/{ChangeLog,packages-list.txt} /install/cdrom/doc | |
101 | cp $(DIR_DL)/rawrite.exe /install/cdrom/dosutils | |
cd1a2927 MT |
102 | unzip -j -L $(DIR_DL)/rawwritewin*.zip -x "*.txt" -d /install/cdrom/dosutils |
103 | ||
03ad5f93 MT |
104 | # make the ISO |
105 | mkdir -p /install/cdrom/boot/isolinux; \ | |
106 | dd if=/dev/zero bs=1k count=2 > /install/cdrom/boot/isolinux/boot.catalog; \ | |
107 | cp /install/images/cdinitrd.gz /install/cdrom/boot/isolinux/instroot.gz; \ | |
108 | cp /boot/vmlinuz-installer /install/cdrom/boot/isolinux/vmlinuz; \ | |
109 | cp $(DIR_SRC)/config/kernel/syslinux.cfg /install/cdrom/boot/isolinux/isolinux.cfg; \ | |
110 | cp $(DIR_SRC)/config/kernel/install-message /install/cdrom/boot/isolinux/message; \ | |
111 | cp /usr/lib/syslinux/isolinux.bin /install/cdrom/boot/isolinux/isolinux.bin; \ | |
112 | cd /install/cdrom && mkisofs -J -r -V "$(NAME)_$(VERSION)" \ | |
113 | -b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table \ | |
114 | -c boot/isolinux/boot.catalog . > /install/images/$(SNAME)-$(VERSION).$(MACHINE).iso |