README: Program name does not need /usr/bin path.
[a-fedora-appliance.git] / Makefile.am
1 # a-fedora-appliance
2 # Copyright (C) 2011-2014 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         firstboot \
22         init \
23         make.sh.in \
24         README
25
26 CLEANFILES = *~ make.sh stamp-supermin
27
28 clean-local:
29         rm -rf supermin.d appliance.d
30
31 bin_SCRIPTS = boot-a-fedora-appliance
32
33 libexec_SCRIPTS = build-a-fedora-appliance
34
35 fsdir = $(libdir)/a-fedora-appliance/supermin.d
36 fs_DATA = \
37         supermin.d/base.tar.gz \
38         supermin.d/init.tar.gz \
39         supermin.d/packages
40
41 supermin.d/base.tar.gz supermin.d/packages: stamp-supermin
42 stamp-supermin: make.sh
43         mkdir -p supermin.d
44         rm -f $@ supermin.d/base.tar.gz supermin.d/packages
45         ./make.sh
46         touch $@
47
48 supermin.d/init.tar.gz: init firstboot
49         mkdir -p supermin.d
50         tar zcf $@ $^
51
52 # This used to be a configure-generated file.  However config.status
53 # always touches the destination file, which means the appliance got
54 # rebuilt too often.
55 make.sh: make.sh.in
56         rm -f $@ $@-t
57         ./config.status --file=$@-t:$<
58         chmod +x $@-t
59         mv $@-t $@
60
61 # For local build/testing.
62 local-build:
63         ./build-a-fedora-appliance supermin.d appliance.d
64
65 local-boot:
66         ./boot-a-fedora-appliance --local
67
68 # To build an RPM in Koji.
69 koji-f20:
70         rpmbuild -bs \
71           --define "_srcrpmdir $$(pwd)" \
72           --define "_sourcedir $$(pwd)" \
73           --define "dist .fc20" a-fedora-appliance.spec
74         koji build --scratch f20 \
75           $(PACKAGE_NAME)-$(PACKAGE_VERSION)-$(RELEASE).fc20.src.rpm