]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame_incremental - lfs/cdrom
Avahi: Added backup.
[people/teissler/ipfire-2.x.git] / lfs / cdrom
... / ...
CommitLineData
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
4# Copyright (C) 2010 IPFire Team <info@ipfire.org> #
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
25include Config
26
27VER = ipfire
28
29THISAPP = cdrom
30TARGET = $(DIR_INFO)/$(THISAPP)
31
32ifeq "$(MACHINE_TYPE)" "arm"
33 TAR_OPTIONS =
34else
35 TAR_OPTIONS = --lzma
36endif
37
38###############################################################################
39# Top-level Rules
40###############################################################################
41
42install : $(TARGET)
43
44check :
45
46download :
47
48md5 :
49
50###############################################################################
51# Installation Details
52###############################################################################
53
54$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
55 rm -rf /install/cdrom /tmp/*
56 mkdir -p /install/cdrom/doc
57
58 # Clear mtab (prevents .journal problems)
59 rm -vf /etc/mtab
60 echo > /etc/mtab
61
62 # Create filelist for packaging.
63 BUILDTARGET="$(BUILDTARGET)" MACHINE="$(MACHINE)" KVER="$(KVER)" \
64 $(DIR_SRC)/src/scripts/archive.files \
65 $(DIR_SRC)/config/rootfiles/common \
66 > /tmp/ROOTFILES
67
68 # Compress root filesystem
69 # Reason for this tar+untar+tar is removing of entries listed two or more in src/ROOTFILES
70 tar -c -C / --files-from=/tmp/ROOTFILES \
71 -f /$(SNAME).tar --exclude='#*' --exclude='dev/pts/*' \
72 --exclude='proc/*' --exclude='tmp/ROOTFILES'
73 rm -f /tmp/ROOTFILES
74 tar -x -C /tmp -f /$(SNAME).tar
75 rm -f /$(SNAME).tar
76 @mkdir /tmp/sys
77 cd /tmp && tar cf /install/cdrom/$(SNAME)-$(VERSION).tlz $(TAR_OPTIONS) * && rm -rf *
78
79 # Other files
80 sed 's/VERSION/$(VERSION)/' $(DIR_SRC)/config/cdrom/README.txt > /install/cdrom/README.txt
81 cp $(DIR_SRC)/doc/COPYING /install/cdrom/
82 cp $(DIR_SRC)/doc/{ChangeLog,packages-list.txt} /install/cdrom/doc
83
84 # Configuration
85 mkdir -p /install/cdrom/boot
86 cp $(DIR_SRC)/config/syslinux/unattended.conf /install/cdrom/boot/unattended.conf
87
88 # Make the ISO
89 mkdir -p /install/cdrom/boot/isolinux
90 dd if=/dev/zero bs=1k count=2 > /install/cdrom/boot/isolinux/boot.catalog
91ifneq "$(MACHINE_TYPE)" "arm"
92 cp /boot/vmlinuz-$(KVER)-ipfire /install/cdrom/boot/isolinux/vmlinuz
93 cp /install/images/initrd /install/cdrom/boot/isolinux/instroot
94 cp $(DIR_SRC)/config/syslinux/syslinux.cfg /install/cdrom/boot/isolinux/isolinux.cfg
95 cp $(DIR_SRC)/config/syslinux/boot.msg /install/cdrom/boot/isolinux/boot.msg
96 cp $(DIR_SRC)/config/syslinux/splash.lss /install/cdrom/boot/isolinux/splash.lss
97 cp /usr/lib/memtest86+/memtest.bin /install/cdrom/boot/isolinux/memtest
98 cp /usr/share/syslinux/isolinux.bin /install/cdrom/boot/isolinux/isolinux.bin
99endif
100 cd /install/cdrom && find -type f ! -name md5sum.txt | grep -v "./boot" | \
101 xargs md5sum > md5sum.txt
102
103ifeq "$(MACHINE_TYPE)" "arm"
104 mkdir -p /install/images
105 cd /install/cdrom && mkisofs -J -r -V "$(NAME)_$(VERSION)" \
106 . > /install/images/$(SNAME)-$(VERSION).$(MACHINE)-full-core$(CORE).iso
107else
108 cd /install/cdrom && mkisofs -J -r -V "$(NAME)_$(VERSION)" \
109 -b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table \
110 -c boot/isolinux/boot.catalog . > /install/images/$(SNAME)-$(VERSION).$(MACHINE)-full-core$(CORE).iso
111endif