source: old/trunk/vtest/Makefile @ 2643

Revision 2643, 1.2 KB checked in by kcr, 5 months ago (diff)

clean target

Line 
1# This is part of vtest, by Karl Ramm.  This file is in the public domain.
2#
3# (I mean, it's a makefile.  There's no art or invention, at least in this one.)
4#BOOTTAR=http://debian.lcs.mit.edu/debian/dists/lenny/main/installer-i386/current/images/netboot/netboot.tar.gz
5BOOTTAR=http://debian.lcs.mit.edu/debian/dists/squeeze/main/installer-i386/current/images/netboot/netboot.tar.gz
6
7all: preseed.cfg tftpboot initrd.gz
8
9netboot.tar.gz:
10        wget $(BOOTTAR)
11
12tftpboot: netboot.tar.gz
13        mkdir tftpboot
14        tar xvzfC netboot.tar.gz tftpboot
15        install files/C00002 tftpboot/pxelinux.cfg
16        touch tftpboot
17
18initrd.gz: tftpboot preseed.cfg
19        -sudo $(RM) -r initrd.expanded
20        mkdir initrd.expanded
21        (cd initrd.expanded && zcat ../tftpboot/debian-installer/i386/initrd.gz | sudo cpio -i --no-absolute-filenames)
22        cp preseed.cfg initrd.expanded
23        (cd initrd.expanded && find | cpio -o -H newc | gzip -v9 > ../initrd.gz)
24        -sudo $(RM) -r initrd.expanded
25
26ssh_key.pub ssh_key:
27        ssh-keygen -N '' -C 'test key' -f ssh_key -t rsa
28
29preseed.cfg: preseed.cfg.in ssh_key.pub
30        sed -e 's,@TEST_KEY@,$(shell cat ssh_key.pub),' preseed.cfg.in > preseed.cfg
31
32.PHONY: clean
33clean:
34        $(RM) -r netboot.tar.gz tftpboot initrd.gz preseed.cfg
35
36.PHONY: clean-all
37clean-all: clean
38        $(RM) ssh_key.pub ssh_key
Note: See TracBrowser for help on using the repository browser.