]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - lfs/cdrom
... Viel zu tun :D
[people/pmueller/ipfire-2.x.git] / lfs / cdrom
CommitLineData
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
27include Config
28
0fbb45e9
MT
29VER = ipfire
30
cd1a2927
MT
31THISAPP = cdrom
32DL_FILE = rawrite.exe
f417cab6 33DL_FROM = $(URL_IPFIRE)
cd1a2927
MT
34TARGET = $(DIR_INFO)/$(THISAPP)
35
36###############################################################################
37# Top-level Rules
38###############################################################################
39
40objects = $(DL_FILE) \
edd536b6 41 rawwritewin-0.7.zip
cd1a2927
MT
42
43$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
44rawwritewin-0.7.zip = http://uranus.it.swin.edu.au/~jn/linux/rawwritewin-0.7.zip
cd1a2927
MT
45
46$(DL_FILE)_MD5 = 7dac6ea496014d32dbce6c50feb254ca
47rawwritewin-0.7.zip_MD5 = 0130b497c8c3bc7d136a4236b0d9fbf6
cd1a2927
MT
48
49install : $(TARGET)
50
51check : $(patsubst %,$(DIR_CHK)/%,$(objects))
52
53download :$(patsubst %,$(DIR_DL)/%,$(objects))
54
55md5 : $(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
03ad5f93
MT
88 cd /tmp && tar jcf /install/cdrom/$(SNAME)-$(VERSION).tbz2 * && rm -rf *
89
cd1a2927 90 # Other files
03ad5f93
MT
91 sed 's/VERSION/$(VERSION)/' $(DIR_SRC)/config/cdrom/README.txt > /install/cdrom/README.txt
92 cp $(DIR_SRC)/doc/COPYING /install/cdrom/
03ad5f93
MT
93 cp $(DIR_SRC)/doc/{ChangeLog,packages-list.txt} /install/cdrom/doc
94 cp $(DIR_DL)/rawrite.exe /install/cdrom/dosutils
cd1a2927
MT
95 unzip -j -L $(DIR_DL)/rawwritewin*.zip -x "*.txt" -d /install/cdrom/dosutils
96
33634aa8
MT
97 # Configuration
98 mkdir -p /install/cdrom/boot
99 cp $(DIR_SRC)/config/kernel/unattended.conf /install/cdrom/boot/unattended.conf
100
0afc6d83 101 # Make the ISO
03ad5f93
MT
102 mkdir -p /install/cdrom/boot/isolinux; \
103 dd if=/dev/zero bs=1k count=2 > /install/cdrom/boot/isolinux/boot.catalog; \
104 cp /install/images/cdinitrd.gz /install/cdrom/boot/isolinux/instroot.gz; \
0afc6d83 105 cp /boot/vmlinuz-$(KVER) /install/cdrom/boot/isolinux/vmlinuz; \
03ad5f93
MT
106 cp $(DIR_SRC)/config/kernel/syslinux.cfg /install/cdrom/boot/isolinux/isolinux.cfg; \
107 cp $(DIR_SRC)/config/kernel/install-message /install/cdrom/boot/isolinux/message; \
108 cp /usr/lib/syslinux/isolinux.bin /install/cdrom/boot/isolinux/isolinux.bin; \
109 cd /install/cdrom && mkisofs -J -r -V "$(NAME)_$(VERSION)" \
110 -b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table \
5bd13f01 111 -c boot/isolinux/boot.catalog . > /install/images/$(SNAME)-$(VERSION).$(MACHINE)-$(IPFVER).iso