spec: BR qemu & kernel so the 'make check' rule can run.
[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 %description
38 Qemu-sanity-check is a short shell script that test-boots a Linux
39 kernel under qemu, making sure it boots up to userspace.  The idea is
40 to test the Linux kernel and/or qemu to make sure they are working.
41
42
43 %prep
44 %setup -q
45
46
47 %build
48 %configure
49 make %{?_smp_mflags}
50
51
52 %check
53 %ifarch %{ix86} x86-64
54 make check || {
55   cat test-suite.log
56   exit 1
57 }
58 %endif
59
60
61 %install
62 make DESTDIR=$RPM_BUILD_ROOT install
63
64
65 %files
66 %doc COPYING README
67 %{_bindir}/qemu-sanity-check
68 %{_libdir}/qemu-sanity-check
69 %{_mandir}/man1/qemu-sanity-check.1*
70
71
72 %changelog
73 * Tue Aug 20 2013 Richard W.M. Jones <rjones@redhat.com> - @PACKAGE_VERSION@-@RPM_RELEASE@
74 - Initial release.