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