-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
42 lines (34 loc) · 1.61 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
## TODO: next release
## Note: https://help.ubuntu.com/community/Installation/MinimalCD
## Maybe use http://archive.ubuntu.com/ubuntu/dists/raring/main/installer-i386/current/images/netboot/mini.iso for next release
BASE := saucy
ISO_URL := http://ftp.twaren.net/ubuntu-cd/$(BASE)
ISO_FILE := ubuntu-13.10-server-amd64.iso
DATE := $$(date +%y%m%d-%H%M)
VERSION := 0.7.0
all: iso
base:
mkdir -p cd-src cd-dst
if [ ! -f /usr/bin/rsync ]; then apt-get -y install rsync; fi
if [ ! -f /usr/bin/genisoimage ]; then apt-get -y install genisoimage; fi
if [ ! -f /usr/bin/isohybrid ]; then apt-get -y install syslinux; fi
if [ ! -f "$(ISO_FILE)" ]; then wget $(ISO_URL)/$(ISO_FILE); fi
mount -o loop $(ISO_FILE) cd-src/
rsync -av cd-src/ cd-dst/
umount cd-src
pre:
cp isolinux/* cd-dst/isolinux
cp preseed/* cd-dst/preseed
cp boot/grub/grub.cfg cd-dst/boot/grub
sed -i "s#\%RELEASE\%#$(VERSION)_$(DATE)#" cd-dst/isolinux/isolinux.cfg
bigtop: base pre
genisoimage -r -V "Haduzilla $(DATE)" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o bigtop-$(VERSION)_$(BASE).iso cd-dst
isohybrid bigtop-$(VERSION)_$(BASE).iso
efi: base pre
genisoimage -r -V "Haduzilla $(DATE)" -cache-inodes -J -l -b isolinux/isolinux.bin -c isolinux/boot.cat -eltorito-alt-boot -e cd-dst/boot/efiboot.img -no-emul-boot -boot-load-size 4 -boot-info-table -iso-level 4 -o bigtop-$(VERSION)_$(BASE)_efi.iso cd-dst
isohybrid bigtop-$(VERSION)_$(BASE)_efi.iso
iso: bigtop
clean:
rm -rf cd-src cd-dst bigtop-$(VERSION)_$(BASE).iso
dist-clean: clean
rm -rf $(ISO_FILE) $(ONE_TMPL)