Drop support for f16, f17 (obsolete) and add support for f19.
[a-fedora-appliance.git] / Makefile.am
1 # a-fedora-appliance
2 # Copyright (C) 2011 Red Hat Inc.
3 #
4 # This program 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 # This program 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 this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 EXTRA_DIST = \
19         .gitignore \
20         a-fedora-appliance.spec \
21         extra-find-requires.sh \
22         firstboot \
23         init \
24         make.sh.in \
25         README
26
27 CLEANFILES = *~ make.sh stamp-supermin
28
29 clean-local:
30         rm -rf supermin.d
31
32 bin_SCRIPTS = boot-a-fedora-appliance
33
34 libexec_SCRIPTS = build-a-fedora-appliance
35
36 fsdir = $(libdir)/a-fedora-appliance/supermin.d
37 fs_DATA = \
38         supermin.d/base.img \
39         supermin.d/init.img \
40         supermin.d/hostfiles
41
42 supermin.d/base.img supermin.d/hostfiles: stamp-supermin
43 stamp-supermin: make.sh
44         mkdir -p supermin.d
45         rm -f $@ supermin.d/base.img supermin.d/hostfiles
46         ./make.sh
47         touch $@
48
49 supermin.d/init.img: init firstboot
50         mkdir -p supermin.d
51         rm -f $@ $@-t
52         echo -e "init\nfirstboot" | cpio --quiet -o -H newc > $@-t
53         mv $@-t $@
54
55 # This used to be a configure-generated file.  However config.status
56 # always touches the destination file, which means the appliance got
57 # rebuilt too often.
58 make.sh: make.sh.in
59         rm -f $@ $@-t
60         ./config.status --file=$@-t:$<
61         chmod +x $@-t
62         mv $@-t $@
63
64 # For local build/testing.
65 local-build:
66         ./build-a-fedora-appliance supermin.d kernel initrd root
67
68 local-boot:
69         ./boot-a-fedora-appliance --local
70
71 # To build an RPM in Koji.
72 koji-f18:
73         rpmbuild -bs \
74           --define "_srcrpmdir $$(pwd)" \
75           --define "_sourcedir $$(pwd)" \
76           --define "dist .fc18" a-fedora-appliance.spec
77         koji build --scratch f18 \
78           $(PACKAGE_NAME)-$(PACKAGE_VERSION)-$(RELEASE).fc18.src.rpm
79
80 koji-f17:
81         rpmbuild -bs \
82           --define "_srcrpmdir $$(pwd)" \
83           --define "_sourcedir $$(pwd)" \
84           --define "dist .fc17" a-fedora-appliance.spec
85         koji build --scratch f17 \
86           $(PACKAGE_NAME)-$(PACKAGE_VERSION)-$(RELEASE).fc17.src.rpm