d57e96fc5e895a712d4cd27d0bdac0cb10a91a41
[qemu-sanity-check.git] / qemu-sanity-check.spec.in
1 %global debug_package %{nil}
2
3 Name:            @PACKAGE_NAME@
4 Version:         @PACKAGE_VERSION@
5 Release:         @RPM_RELEASE@%{?dist}
6 Summary:         Simple qemu and Linux kernel sanity checker
7
8 License:         GPLv2+
9 URL:             http://people.redhat.com/~rjones/qemu-sanity-check
10 Source0:         http://people.redhat.com/~rjones/qemu-sanity-check/files/%{name}-%{version}.tar.gz
11
12 # For building manual pages.
13 BuildRequires:   /usr/bin/perldoc
14
15 # For building the initramfs.
16 BuildRequires:   cpio
17 BuildRequires:   glibc-static
18
19 # BuildRequire these in order to let 'make check' run.  These are
20 # not required unless you want to run the tests.  Note don't run the
21 # tests on ARM since qemu isn't likely to work.
22 %ifarch %{ix86} x86_64
23 BuildRequires:   qemu-system-x86
24 %endif
25
26 BuildRequires:   kernel
27
28 %ifarch %{ix86} x86_64
29 Requires:        qemu-system-x86
30 %endif
31 %ifarch armv7hl
32 Requires:        qemu-system-arm
33 %endif
34
35 Requires:        kernel
36
37 # Require the -nodeps subpackage.
38 Requires:        %{name}-nodeps = %{version}-%{release}
39
40
41 %description
42 Qemu-sanity-check is a short shell script that test-boots a Linux
43 kernel under qemu, making sure it boots up to userspace.  The idea is
44 to test the Linux kernel and/or qemu to make sure they are working.
45
46 Most users should install the %{name} package.
47
48 If you are testing qemu or the kernel in those packages and you want
49 to avoid a circular dependency on qemu or kernel, you should use
50 'BuildRequires: %{name}-nodeps' instead.
51
52
53 %package nodeps
54 Summary:         Simple qemu and Linux kernel sanity checker (no dependencies)
55 License:         GPLv2+
56
57
58 %description nodeps
59 This is the no-depedencies version of %{name}.  It is exactly the same
60 as %{name} except that this package does not depend on qemu or kernel.
61
62
63 %prep
64 %setup -q
65
66
67 %build
68 # NB: canonical_arch is a variable in the final script, so it
69 # has to be escaped here.
70 %configure --with-qemu-list="qemu-system-\$canonical_arch"
71 make %{?_smp_mflags}
72
73
74 %check
75 %ifarch %{ix86} x86_64
76 make check || {
77   cat test-suite.log
78   exit 1
79 }
80 %endif
81
82
83 %install
84 make DESTDIR=$RPM_BUILD_ROOT install
85
86
87 %files
88 %doc COPYING
89
90
91 %files nodeps
92 %doc COPYING README
93 %{_bindir}/qemu-sanity-check
94 %{_libdir}/qemu-sanity-check
95 %{_mandir}/man1/qemu-sanity-check.1*
96
97
98 %changelog
99 * Tue Aug 20 2013 Richard W.M. Jones <rjones@redhat.com> - @PACKAGE_VERSION@-@RPM_RELEASE@
100 - Initial release.