1 # If you have trouble building locally ('make local') try adding
2 # %libguestfs_buildnet 1
3 # to your ~/.rpmmacros file.
5 # Enable to build using a network repo
7 %if %{defined libguestfs_buildnet}
8 %global buildnet %{libguestfs_buildnet}
13 %global supermindir %{_libdir}/a-fedora-appliance/supermin.d
14 %global appliancedir %{_localstatedir}/lib/a-fedora-appliance
17 Name: a-fedora-appliance
19 Release: @RELEASE@%{?dist}
20 Summary: A package that contains a Fedora appliance
22 Group: Applications/Emulators
24 URL: http://git.annexia.org/?p=a-fedora-appliance.git
25 Source0: %{name}-%{version}.tar.gz
27 BuildRequires: @PACKAGELIST@
28 Requires: @PACKAGELIST@
30 BuildRequires: createrepo
32 BuildRequires: supermin >= 5.1.6
34 Requires: qemu-kvm >= 0.12
38 This is a package that contains a Fedora appliance, otherwise known as
39 a small Fedora virtual machine.
41 You can boot this virtual machine, log into it, and use it as a
42 throwaway to test Fedora things. Or you can use it as a test of your
43 hypervisor or virtual machine management tools.
45 Note: The appliance only contains command line tools (no X11 or office
46 suites). rpm and yum installation of packages is supported.
49 This package contains an appliance built for Fedora %{fedora}.
62 find /var/cache/yum -type f -name '*.rpm' -print0 | xargs -0 cp -t repo
66 cachedir=/var/cache/yum
68 logfile=/var/log/yum.log
77 baseurl=file://$(pwd)/repo
78 failovermethod=priority
82 %define extra --with-packager-config=$(pwd)/yum.conf
91 make DESTDIR=$RPM_BUILD_ROOT install
93 mkdir -p $RPM_BUILD_ROOT%{appliancedir}
97 # XXX We should add an RPM trigger so that this gets rebuilt after any
98 # dependent package install (recursively).
100 %{_libexecdir}/build-a-fedora-appliance "%{supermindir}" "%{appliancedir}" && \
101 echo "Fedora %{fedora} appliance built in %{appliancedir}"
105 if [ "$1" -eq 0 ]; then
106 rm -f "%{appliancedir}/kernel" "%{appliancedir}/initrd" "%{appliancedir}/root"
111 %defattr(-,root,root,-)
114 %{_libdir}/a-fedora-appliance/
115 %{_libexecdir}/build-a-fedora-appliance
116 %{_bindir}/boot-a-fedora-appliance
120 * Mon Oct 10 2011 Richard W.M. Jones <rjones@redhat.com> - 1.0-@RELEASE@