]> git.pld-linux.org Git - packages/rt-tests.git/blob - rt-tests.spec
- updated to 1.9; python3 now
[packages/rt-tests.git] / rt-tests.spec
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
15
16 Summary:        Programs that test various rt-linux features
17 Summary(pl.UTF-8):      Programy testujące różne właściwości rt-linuksa
18 %define pname   rt-tests
19 Name:           %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
20 Version:        1.9
21 %define rel     1
22 Release:        %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
23 License:        GPL v2
24 Group:          Applications/System
25 Source0:        https://www.kernel.org/pub/linux/utils/rt-tests/%{pname}-%{version}.tar.xz
26 # Source0-md5:  d728a21dcbc34ee789ba71c1e4c621b7
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
30 URL:            https://rt.wiki.kernel.org/index.php/Cyclictest
31 %{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
32 %ifarch %{ix86} %{x8664} x32 ia64 mips ppc
33 BuildRequires:  numactl-devel
34 %endif
35 BuildRequires:  python3-modules >= 1:3
36 BuildRequires:  rpmbuild(macros) >= 1.701
37 BuildRequires:  sed >= 4.0
38 BuildRequires:  tar >= 1:1.22
39 BuildRequires:  xz
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 Programs that test various rt-linux features.
44
45 %description -l pl.UTF-8
46 Programy testujące różne właściwości rt-linuksa.
47
48 %define kernel_pkg()\
49 %package -n kernel%{_alt_kernel}-char-backfire\
50 Summary:        Linux kernel module to benchmark signal delivery\
51 Summary(pl.UTF-8):      Moduł jądra Linuksa do testowania dostarczania sygnałów\
52 Release:        %{rel}@%{_kernel_ver_str}\
53 Group:          Base/Kernel\
54 Requires(post,postun):  /sbin/depmod\
55 %requires_releq_kernel\
56 Requires(postun):       %releq_kernel\
57 \
58 %description -n kernel%{_alt_kernel}-char-backfire\
59 Linux kernel "backfire" module sends a signal from driver to user.\
60 It's primary use is benchmarking signal delivery.\
61 \
62 %description -n kernel%{_alt_kernel}-char-backfire -l pl.UTF-8\
63 Moduł jądra Linuksa "backfire" wysyła sygnał ze sterownika do\
64 użytkownika. Głównym zastosowaniem jest testowanie wydajności\
65 dostarczania sygnałów.\
66 \
67 %if %{with kernel}\
68 %files -n kernel%{_alt_kernel}-char-backfire\
69 %defattr(644,root,root,755)\
70 /lib/modules/%{_kernel_ver}/kernel/drivers/char/backfire.ko*\
71 %endif\
72 \
73 %post   -n kernel%{_alt_kernel}-char-backfire\
74 %depmod %{_kernel_ver}\
75 \
76 %postun -n kernel%{_alt_kernel}-char-backfire\
77 %depmod %{_kernel_ver}\
78 %{nil}
79
80 %define build_kernel_pkg()\
81 %build_kernel_modules -C src/backfire -m backfire\
82 \
83 %install_kernel_modules -D installed -m src/backfire/backfire -d kernel/drivers/char\
84 %{nil}
85
86 %{?with_kernel:%{expand:%create_kernel_packages}}
87
88 %prep
89 %setup -q -n %{pname}-%{version}
90 %patch0 -p1
91
92 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' src/cyclictest/get_cyclictest_snapshot.py
93
94 %build
95 %if %{with userspace}
96 CFLAGS="%{rpmcflags}" \
97 %{__make} \
98         prefix="%{_prefix}" \
99         CC="%{__cc}" \
100         LDFLAGS="%{rpmldflags}"
101 %endif
102
103 %{?with_kernel:%{expand:%build_kernel_packages}}
104
105 %install
106 rm -rf $RPM_BUILD_ROOT
107
108 %if %{with userspace}
109 %{__make} install \
110         DESTDIR=$RPM_BUILD_ROOT \
111         prefix="%{_prefix}" \
112         PYLIB="%{py3_sitescriptdir}"
113
114 %py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir}
115 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir}
116 %endif
117
118 %if %{with kernel}
119 cp -a installed/* $RPM_BUILD_ROOT
120 %endif
121
122 %clean
123 rm -rf $RPM_BUILD_ROOT
124
125 %files
126 %defattr(644,root,root,755)
127 %doc README.markdown MAINTAINERS
128 %attr(755,root,root) %{_bindir}/cyclicdeadline
129 %attr(755,root,root) %{_bindir}/cyclictest
130 %attr(755,root,root) %{_bindir}/deadline_test
131 %attr(755,root,root) %{_bindir}/determine_maximum_mpps.sh
132 %attr(755,root,root) %{_bindir}/get_cpuinfo_mhz.sh
133 %attr(755,root,root) %{_bindir}/get_cyclictest_snapshot
134 %attr(755,root,root) %{_bindir}/hackbench
135 %attr(755,root,root) %{_bindir}/hwlatdetect
136 %attr(755,root,root) %{_bindir}/oslat
137 %attr(755,root,root) %{_bindir}/pi_stress
138 %attr(755,root,root) %{_bindir}/pip_stress
139 %attr(755,root,root) %{_bindir}/pmqtest
140 %attr(755,root,root) %{_bindir}/ptsematest
141 %attr(755,root,root) %{_bindir}/queuelat
142 %attr(755,root,root) %{_bindir}/rt-migrate-test
143 %attr(755,root,root) %{_bindir}/signaltest
144 %attr(755,root,root) %{_bindir}/sigwaittest
145 %attr(755,root,root) %{_bindir}/ssdd
146 %attr(755,root,root) %{_bindir}/svsematest
147 %{py3_sitescriptdir}/hwlatdetect.py
148 %{py3_sitescriptdir}/get_cyclictest_snapshot.py
149 %{py3_sitescriptdir}/__pycache__/hwlatdetect.cpython-*.py[co]
150 %{py3_sitescriptdir}/__pycache__/get_cyclictest_snapshot.cpython-*.py[co]
151 %{_mandir}/man8/cyclicdeadline.8*
152 %{_mandir}/man8/cyclictest.8*
153 %{_mandir}/man8/deadline_test.8*
154 %{_mandir}/man8/get_cyclictest_snapshot.8*
155 %{_mandir}/man8/hackbench.8*
156 %{_mandir}/man8/hwlatdetect.8*
157 %{_mandir}/man8/oslat.8*
158 %{_mandir}/man8/pi_stress.8*
159 %{_mandir}/man8/pip_stress.8*
160 %{_mandir}/man8/pmqtest.8*
161 %{_mandir}/man8/ptsematest.8*
162 %{_mandir}/man8/queuelat.8*
163 %{_mandir}/man8/rt-migrate-test.8*
164 %{_mandir}/man8/signaltest.8*
165 %{_mandir}/man8/sigwaittest.8*
166 %{_mandir}/man8/ssdd.8*
167 %{_mandir}/man8/svsematest.8*
This page took 0.090171 seconds and 3 git commands to generate.