]> git.pld-linux.org Git - packages/rt-tests.git/blob - rt-tests.spec
4554ed19fac86fc35bf37fdbad2eb409bd14e1b4
[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.5
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:  306ed2ef9473a5779b846d08168b6e71
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 mipx ppc
33 BuildRequires:  numactl-devel
34 %endif
35 BuildRequires:  python-modules
36 BuildRequires:  rpmbuild(macros) >= 1.701
37 BuildRequires:  tar >= 1:1.22
38 BuildRequires:  xz
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %description
42 Programs that test various rt-linux features.
43
44 %description -l pl.UTF-8
45 Programy testujące różne właściwości rt-linuksa.
46
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
87 %prep
88 %setup -q -n %{pname}-%{version}
89 %patch0 -p1
90
91 %build
92 %if %{with userspace}
93 CFLAGS="%{rpmcflags}" \
94 %{__make} \
95         prefix="%{_prefix}" \
96         CC="%{__cc}" \
97         LDFLAGS="%{rpmldflags}"
98 %endif
99
100 %{?with_kernel:%{expand:%build_kernel_packages}}
101
102 %install
103 rm -rf $RPM_BUILD_ROOT
104
105 %if %{with userspace}
106 %{__make} install \
107         DESTDIR=$RPM_BUILD_ROOT \
108         prefix="%{_prefix}" \
109         PYLIB="%{py_sitescriptdir}" \
110         srcdir="%{_prefix}/src/%{name}-%{version}"
111
112 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
113 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
114 %endif
115
116 %if %{with kernel}
117 cp -a installed/* $RPM_BUILD_ROOT
118 %endif
119
120 %clean
121 rm -rf $RPM_BUILD_ROOT
122
123 %files
124 %defattr(644,root,root,755)
125 %doc README.markdown MAINTAINERS
126 %attr(755,root,root) %{_bindir}/cyclicdeadline
127 %attr(755,root,root) %{_bindir}/cyclictest
128 %attr(755,root,root) %{_bindir}/deadline_test
129 %attr(755,root,root) %{_bindir}/determine_maximum_mpps.sh
130 %attr(755,root,root) %{_bindir}/get_cpuinfo_mhz.sh
131 %attr(755,root,root) %{_bindir}/hackbench
132 %attr(755,root,root) %{_bindir}/hwlatdetect
133 %attr(755,root,root) %{_bindir}/pi_stress
134 %attr(755,root,root) %{_bindir}/pip_stress
135 %attr(755,root,root) %{_bindir}/pmqtest
136 %attr(755,root,root) %{_bindir}/ptsematest
137 %attr(755,root,root) %{_bindir}/queuelat
138 %attr(755,root,root) %{_bindir}/rt-migrate-test
139 %attr(755,root,root) %{_bindir}/signaltest
140 %attr(755,root,root) %{_bindir}/sigwaittest
141 %attr(755,root,root) %{_bindir}/ssdd
142 %attr(755,root,root) %{_bindir}/svsematest
143 %{_mandir}/man8/cyclictest.8*
144 %{_mandir}/man8/deadline_test.8*
145 %{_mandir}/man8/hackbench.8*
146 %{_mandir}/man8/hwlatdetect.8*
147 %{_mandir}/man8/pi_stress.8*
148 %{_mandir}/man8/pip_stress.8*
149 %{_mandir}/man8/pmqtest.8*
150 %{_mandir}/man8/ptsematest.8*
151 %{_mandir}/man8/queuelat.8*
152 %{_mandir}/man8/rt-migrate-test.8*
153 %{_mandir}/man8/signaltest.8*
154 %{_mandir}/man8/sigwaittest.8*
155 %{_mandir}/man8/ssdd.8*
156 %{_mandir}/man8/svsematest.8*
157 %{py_sitescriptdir}/hwlatdetect.py*
158 %{_prefix}/src/%{name}-%{version}
This page took 0.0701 seconds and 2 git commands to generate.