]>
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 | ||
0fbb45e9 MT |
29 | VER = ipfire |
30 | ||
cd1a2927 MT |
31 | THISAPP = cdrom |
32 | DL_FILE = rawrite.exe | |
f417cab6 | 33 | DL_FROM = $(URL_IPFIRE) |
cd1a2927 MT |
34 | TARGET = $(DIR_INFO)/$(THISAPP) |
35 | ||
36 | ############################################################################### | |
37 | # Top-level Rules | |
38 | ############################################################################### | |
39 | ||
40 | objects = $(DL_FILE) \ | |
edd536b6 | 41 | rawwritewin-0.7.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 | |
cd1a2927 MT |
45 | |
46 | $(DL_FILE)_MD5 = 7dac6ea496014d32dbce6c50feb254ca | |
47 | rawwritewin-0.7.zip_MD5 = 0130b497c8c3bc7d136a4236b0d9fbf6 | |
cd1a2927 MT |
48 | |
49 | install : $(TARGET) | |
50 | ||
51 | check : $(patsubst %,$(DIR_CHK)/%,$(objects)) | |
52 | ||
53 | download :$(patsubst %,$(DIR_DL)/%,$(objects)) | |
54 | ||
55 | md5 : $(subst %,%_MD5,$(objects)) | |
56 | ||
57 | ############################################################################### | |
58 | # Downloading, checking, md5sum | |
59 | ############################################################################### | |
60 | ||
61 | $(patsubst %,$(DIR_CHK)/%,$(objects)) : | |
62 | @$(CHECK) | |
63 | ||
64 | $(patsubst %,$(DIR_DL)/%,$(objects)) : | |
65 | @$(LOAD) | |
66 | ||
67 | $(subst %,%_MD5,$(objects)) : | |
68 | @$(MD5) | |
69 | ||
70 | ############################################################################### | |
71 | # Installation Details | |
72 | ############################################################################### | |
73 | ||
74 | $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) | |
75 | rm -rf /install/cdrom /tmp/* | |
76 | ||
77 | # Compress root filesystem | |
78 | # Reason for this tar+untar+tar is removing of entries listed two or more in src/ROOTFILES | |
33634aa8 | 79 | mkdir -p /install/cdrom/{doc,dosutils} |
0fbb45e9 MT |
80 | find $(DIR_SRC)/config/rootfiles/common -maxdepth 1 -type f | xargs cat >> /tmp/ROOTFILES |
81 | find $(DIR_SRC)/config/rootfiles/ver_$(IPFVER) -maxdepth 1 -type f | xargs cat >> /tmp/ROOTFILES | |
50f96334 | 82 | tar -c -C / --files-from=/tmp/ROOTFILES \ |
90c973a6 MT |
83 | -f /$(SNAME).tar --exclude='#*' --exclude='dev/pts/*' \ |
84 | --exclude='proc/*' --exclude='tmp/ROOTFILES' | |
50f96334 | 85 | rm -f /tmp/ROOTFILES |
cd1a2927 MT |
86 | tar -x -C /tmp -f /$(SNAME).tar |
87 | rm -f /$(SNAME).tar | |
069680ac | 88 | @mkdir /tmp/sys |
03ad5f93 MT |
89 | cd /tmp && tar jcf /install/cdrom/$(SNAME)-$(VERSION).tbz2 * && rm -rf * |
90 | ||
cd1a2927 | 91 | # Other files |
03ad5f93 MT |
92 | sed 's/VERSION/$(VERSION)/' $(DIR_SRC)/config/cdrom/README.txt > /install/cdrom/README.txt |
93 | cp $(DIR_SRC)/doc/COPYING /install/cdrom/ | |
03ad5f93 MT |
94 | cp $(DIR_SRC)/doc/{ChangeLog,packages-list.txt} /install/cdrom/doc |
95 | cp $(DIR_DL)/rawrite.exe /install/cdrom/dosutils | |
cd1a2927 MT |
96 | unzip -j -L $(DIR_DL)/rawwritewin*.zip -x "*.txt" -d /install/cdrom/dosutils |
97 | ||
33634aa8 MT |
98 | # Configuration |
99 | mkdir -p /install/cdrom/boot | |
100 | cp $(DIR_SRC)/config/kernel/unattended.conf /install/cdrom/boot/unattended.conf | |
101 | ||
0afc6d83 | 102 | # Make the ISO |
03ad5f93 MT |
103 | mkdir -p /install/cdrom/boot/isolinux; \ |
104 | dd if=/dev/zero bs=1k count=2 > /install/cdrom/boot/isolinux/boot.catalog; \ | |
105 | cp /install/images/cdinitrd.gz /install/cdrom/boot/isolinux/instroot.gz; \ | |
0afc6d83 | 106 | cp /boot/vmlinuz-$(KVER) /install/cdrom/boot/isolinux/vmlinuz; \ |
03ad5f93 MT |
107 | cp $(DIR_SRC)/config/kernel/syslinux.cfg /install/cdrom/boot/isolinux/isolinux.cfg; \ |
108 | cp $(DIR_SRC)/config/kernel/install-message /install/cdrom/boot/isolinux/message; \ | |
109 | cp /usr/lib/syslinux/isolinux.bin /install/cdrom/boot/isolinux/isolinux.bin; \ | |
110 | cd /install/cdrom && mkisofs -J -r -V "$(NAME)_$(VERSION)" \ | |
111 | -b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table \ | |
5bd13f01 | 112 | -c boot/isolinux/boot.catalog . > /install/images/$(SNAME)-$(VERSION).$(MACHINE)-$(IPFVER).iso |