]>
Commit | Line | Data |
---|---|---|
e71ed1dd JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without kernel # backfire kernel module | |
4 | %bcond_without userspace # userspace programs | |
5 | %bcond_with verbose # verbose kernel module build (V=1) | |
6 | ||
7 | %if 0%{?_pld_builder:1} && %{with kernel} && %{with userspace} | |
8 | %{error:kernel and userspace cannot be built at the same time on PLD builders} | |
9 | exit 1 | |
10 | %endif | |
11 | ||
12 | %if %{without userspace} | |
13 | %define _enable_debug_packages 0 | |
14 | %endif | |
185baaca JK |
15 | |
16 | Summary: Programs that test various rt-linux features | |
7edbae6e | 17 | Summary(pl.UTF-8): Programy testujące różne właściwości rt-linuksa |
e71ed1dd JB |
18 | %define pname rt-tests |
19 | Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel} | |
37a5aca1 | 20 | Version: 1.6 |
e71ed1dd JB |
21 | %define rel 1 |
22 | Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}} | |
185baaca | 23 | License: GPL v2 |
7edbae6e | 24 | Group: Applications/System |
e71ed1dd | 25 | Source0: https://www.kernel.org/pub/linux/utils/rt-tests/%{pname}-%{version}.tar.xz |
37a5aca1 | 26 | # Source0-md5: 8f113923fa265ef314e3d5642addb202 |
e71ed1dd JB |
27 | # https://bugs.launchpad.net/ubuntu/+source/rt-tests/+bug/881771/+attachment/2572753/+files/0001-Fix-deprecated-removed-spinlock-declaration.patch |
28 | # + http://www.spinics.net/lists/linux-rt-users/msg08966.html | |
29 | Patch0: %{pname}-backfire.patch | |
185baaca | 30 | URL: https://rt.wiki.kernel.org/index.php/Cyclictest |
e71ed1dd | 31 | %{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}} |
37a5aca1 | 32 | %ifarch %{ix86} %{x8664} x32 ia64 mips ppc |
7edbae6e JB |
33 | BuildRequires: numactl-devel |
34 | %endif | |
e71ed1dd JB |
35 | BuildRequires: python-modules |
36 | BuildRequires: rpmbuild(macros) >= 1.701 | |
7edbae6e JB |
37 | BuildRequires: tar >= 1:1.22 |
38 | BuildRequires: xz | |
185baaca JK |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
41 | %description | |
42 | Programs that test various rt-linux features. | |
43 | ||
7edbae6e JB |
44 | %description -l pl.UTF-8 |
45 | Programy testujące różne właściwości rt-linuksa. | |
46 | ||
e71ed1dd JB |
47 | %define kernel_pkg()\ |
48 | %package -n kernel%{_alt_kernel}-char-backfire\ | |
49 | Summary: Linux kernel module to benchmark signal delivery\ | |
50 | Summary(pl.UTF-8): Moduł jądra Linuksa do testowania dostarczania sygnałów\ | |
51 | Release: %{rel}@%{_kernel_ver_str}\ | |
52 | Group: Base/Kernel\ | |
53 | Requires(post,postun): /sbin/depmod\ | |
54 | %requires_releq_kernel\ | |
55 | Requires(postun): %releq_kernel\ | |
56 | \ | |
57 | %description -n kernel%{_alt_kernel}-char-backfire\ | |
58 | Linux kernel "backfire" module sends a signal from driver to user.\ | |
59 | It's primary use is benchmarking signal delivery.\ | |
60 | \ | |
61 | %description -n kernel%{_alt_kernel}-char-backfire -l pl.UTF-8\ | |
62 | Moduł jądra Linuksa "backfire" wysyła sygnał ze sterownika do\ | |
63 | użytkownika. Głównym zastosowaniem jest testowanie wydajności\ | |
64 | dostarczania sygnałów.\ | |
65 | \ | |
66 | %if %{with kernel}\ | |
67 | %files -n kernel%{_alt_kernel}-char-backfire\ | |
68 | %defattr(644,root,root,755)\ | |
69 | /lib/modules/%{_kernel_ver}/kernel/drivers/char/backfire.ko*\ | |
70 | %endif\ | |
71 | \ | |
72 | %post -n kernel%{_alt_kernel}-char-backfire\ | |
73 | %depmod %{_kernel_ver}\ | |
74 | \ | |
75 | %postun -n kernel%{_alt_kernel}-char-backfire\ | |
76 | %depmod %{_kernel_ver}\ | |
77 | %{nil} | |
78 | ||
79 | %define build_kernel_pkg()\ | |
80 | %build_kernel_modules -C src/backfire -m backfire\ | |
81 | \ | |
82 | %install_kernel_modules -D installed -m src/backfire/backfire -d kernel/drivers/char\ | |
83 | %{nil} | |
84 | ||
85 | %{?with_kernel:%{expand:%create_kernel_packages}} | |
86 | ||
185baaca | 87 | %prep |
e71ed1dd JB |
88 | %setup -q -n %{pname}-%{version} |
89 | %patch0 -p1 | |
185baaca JK |
90 | |
91 | %build | |
e71ed1dd | 92 | %if %{with userspace} |
7edbae6e | 93 | CFLAGS="%{rpmcflags}" \ |
185baaca JK |
94 | %{__make} \ |
95 | prefix="%{_prefix}" \ | |
96 | CC="%{__cc}" \ | |
185baaca | 97 | LDFLAGS="%{rpmldflags}" |
e71ed1dd JB |
98 | %endif |
99 | ||
100 | %{?with_kernel:%{expand:%build_kernel_packages}} | |
185baaca JK |
101 | |
102 | %install | |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | ||
e71ed1dd | 105 | %if %{with userspace} |
185baaca JK |
106 | %{__make} install \ |
107 | DESTDIR=$RPM_BUILD_ROOT \ | |
108 | prefix="%{_prefix}" \ | |
37a5aca1 | 109 | PYLIB="%{py_sitescriptdir}" |
185baaca | 110 | |
e71ed1dd JB |
111 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} |
112 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
113 | %endif | |
114 | ||
115 | %if %{with kernel} | |
116 | cp -a installed/* $RPM_BUILD_ROOT | |
117 | %endif | |
118 | ||
185baaca JK |
119 | %clean |
120 | rm -rf $RPM_BUILD_ROOT | |
121 | ||
122 | %files | |
123 | %defattr(644,root,root,755) | |
124 | %doc README.markdown MAINTAINERS | |
cfaa2fee | 125 | %attr(755,root,root) %{_bindir}/cyclicdeadline |
185baaca | 126 | %attr(755,root,root) %{_bindir}/cyclictest |
cfaa2fee | 127 | %attr(755,root,root) %{_bindir}/deadline_test |
fe7ba9a1 JB |
128 | %attr(755,root,root) %{_bindir}/determine_maximum_mpps.sh |
129 | %attr(755,root,root) %{_bindir}/get_cpuinfo_mhz.sh | |
185baaca JK |
130 | %attr(755,root,root) %{_bindir}/hackbench |
131 | %attr(755,root,root) %{_bindir}/hwlatdetect | |
132 | %attr(755,root,root) %{_bindir}/pi_stress | |
133 | %attr(755,root,root) %{_bindir}/pip_stress | |
134 | %attr(755,root,root) %{_bindir}/pmqtest | |
135 | %attr(755,root,root) %{_bindir}/ptsematest | |
cfaa2fee | 136 | %attr(755,root,root) %{_bindir}/queuelat |
185baaca | 137 | %attr(755,root,root) %{_bindir}/rt-migrate-test |
185baaca JK |
138 | %attr(755,root,root) %{_bindir}/signaltest |
139 | %attr(755,root,root) %{_bindir}/sigwaittest | |
fe7ba9a1 | 140 | %attr(755,root,root) %{_bindir}/ssdd |
185baaca | 141 | %attr(755,root,root) %{_bindir}/svsematest |
185baaca | 142 | %{_mandir}/man8/cyclictest.8* |
fe7ba9a1 | 143 | %{_mandir}/man8/deadline_test.8* |
185baaca JK |
144 | %{_mandir}/man8/hackbench.8* |
145 | %{_mandir}/man8/hwlatdetect.8* | |
146 | %{_mandir}/man8/pi_stress.8* | |
fe7ba9a1 | 147 | %{_mandir}/man8/pip_stress.8* |
185baaca JK |
148 | %{_mandir}/man8/pmqtest.8* |
149 | %{_mandir}/man8/ptsematest.8* | |
fe7ba9a1 | 150 | %{_mandir}/man8/queuelat.8* |
cfaa2fee | 151 | %{_mandir}/man8/rt-migrate-test.8* |
185baaca JK |
152 | %{_mandir}/man8/signaltest.8* |
153 | %{_mandir}/man8/sigwaittest.8* | |
fe7ba9a1 | 154 | %{_mandir}/man8/ssdd.8* |
185baaca | 155 | %{_mandir}/man8/svsematest.8* |
e71ed1dd | 156 | %{py_sitescriptdir}/hwlatdetect.py* |