]>
Commit | Line | Data |
---|---|---|
7f6240d5 JB |
1 | # |
2 | # Conditional build: | |
e95e4963 JB |
3 | %bcond_without apidocs # Doxygen documentation |
4 | %bcond_without qt # Qt (5) based tools | |
a3c18cab | 5 | %bcond_without static_libs # static libraries |
7f6240d5 | 6 | # |
31abdcf1 JB |
7 | Summary: Collection of Video4Linux utilities |
8 | Summary(pl.UTF-8): Zbiór narzędzi do urządzeń Video4Linux | |
24a22ca1 | 9 | Name: v4l-utils |
b876956f | 10 | Version: 1.26.1 |
b5e330f3 | 11 | Release: 1 |
24a22ca1 JB |
12 | License: GPL v2+ (utilities), LGPL v2.1+ (libraries) |
13 | Group: Applications/System | |
b876956f JP |
14 | Source0: https://linuxtv.org/downloads/v4l-utils/%{name}-%{version}.tar.xz |
15 | # Source0-md5: a3565a8ccc427dcce52845c2b8880c28 | |
dd68ed77 | 16 | URL: https://linuxtv.org/wiki/index.php/V4l-utils |
7f6240d5 JB |
17 | BuildRequires: OpenGL-devel |
18 | BuildRequires: OpenGL-GLU-devel | |
aaedf326 | 19 | %if %{with qt} |
c4427349 JB |
20 | BuildRequires: Qt5Core-devel >= 5.0 |
21 | BuildRequires: Qt5Gui-devel >= 5.0 | |
22 | BuildRequires: Qt5OpenGL-devel >= 5.0 | |
23 | BuildRequires: Qt5Widgets-devel >= 5.0 | |
aaedf326 JP |
24 | BuildRequires: qt5-build >= 5.0 |
25 | %endif | |
6bc65ad4 JP |
26 | BuildRequires: SDL2-devel |
27 | BuildRequires: SDL2_image-devel | |
7f6240d5 | 28 | BuildRequires: alsa-lib-devel |
bd0fd6e5 JB |
29 | # for bpf |
30 | BuildRequires: clang | |
e95e4963 | 31 | %{?with_apidocs:BuildRequires: doxygen >= 1.8.6} |
bd0fd6e5 | 32 | BuildRequires: elfutils-devel |
1a46076a | 33 | BuildRequires: gettext-tools >= 0.19.8 |
b5e330f3 JP |
34 | BuildRequires: json-c-devel >= 0.15 |
35 | BuildRequires: libbpf-devel >= 0.7 | |
b0bb5368 | 36 | BuildRequires: libjpeg-devel |
e95e4963 | 37 | BuildRequires: libstdc++-devel >= 6:4.7 |
b876956f JP |
38 | BuildRequires: meson >= 0.54 |
39 | BuildRequires: ninja | |
6081edf3 | 40 | BuildRequires: pkgconfig |
e95e4963 | 41 | BuildRequires: rpm-build >= 4.6 |
b876956f | 42 | BuildRequires: rpmbuild(macros) >= 1.736 |
709e7dc2 | 43 | BuildRequires: systemd-devel |
b876956f | 44 | BuildRequires: tar >= 1:1.22 |
460b2a5e | 45 | BuildRequires: udev-devel |
6081edf3 | 46 | BuildRequires: xorg-lib-libX11-devel |
b876956f | 47 | BuildRequires: xz |
b5e330f3 | 48 | Requires: json-c >= 0.15 |
6081edf3 | 49 | Requires: libv4l = %{version}-%{release} |
aac6eedb SP |
50 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
51 | ||
eb367d89 JB |
52 | # ELF files with some special architecture inside |
53 | %define _noautostrip /lib/udev/rc_keymaps/.* | |
54 | ||
aac6eedb | 55 | %description |
24a22ca1 JB |
56 | A series of utilities for media devices, allowing to handle the |
57 | proprietary formats available at most webcams (libv4l), and providing | |
58 | tools to test V4L devices. | |
aac6eedb | 59 | |
31abdcf1 JB |
60 | %description -l pl.UTF-8 |
61 | Zbiór narzędzi do urządzeń multimedialnych, pozwalający obsługiwać | |
62 | własnościowe formaty dostępne w większości kamer internetowych | |
63 | (libv4l) oraz testować urządzenia V4L. | |
64 | ||
24a22ca1 | 65 | %package qt |
bd0fd6e5 JB |
66 | Summary: Qt-based V4L2 capture and test utilities |
67 | Summary(pl.UTF-8): Oparte na Qt narzędzia V4L2 do przechwytywania obrazu i testowania | |
24a22ca1 JB |
68 | License: GPL v2+ |
69 | Group: X11/Applications | |
8e5bbdd5 JP |
70 | Requires(post,postun): desktop-file-utils |
71 | Requires(post,postun): gtk-update-icon-cache | |
c4427349 JB |
72 | Requires: Qt5Core >= 5.0 |
73 | Requires: Qt5Gui >= 5.0 | |
74 | Requires: Qt5OpenGL >= 5.0 | |
75 | Requires: Qt5Widgets >= 5.0 | |
8e5bbdd5 | 76 | Requires: hicolor-icon-theme |
6081edf3 | 77 | Requires: libv4l = %{version}-%{release} |
335dd8cd | 78 | |
24a22ca1 | 79 | %description qt |
bd0fd6e5 | 80 | Graphical Qt V4L2 control panel and capture utility. |
31abdcf1 JB |
81 | |
82 | %description qt -l pl.UTF-8 | |
bd0fd6e5 JB |
83 | Graficzny panel kontrolny V4L2 i narzędzie do przechwytywania obrazu |
84 | oparte na Qt. | |
aac6eedb | 85 | |
5872d924 TP |
86 | %package -n ir-keytable |
87 | Summary: Alter keymaps of Remote Controller devices | |
31abdcf1 | 88 | Summary(pl.UTF-8): Zmiana map klawiszy urządzeń do zdalnego sterowania |
5872d924 TP |
89 | License: GPL v2+ |
90 | Group: Applications/Console | |
91 | ||
92 | %description -n ir-keytable | |
111595d9 TP |
93 | Dump, Load or Modify IR receiver input tables. This package allows one |
94 | to change the keymap of controller receivers. Those receivers are | |
95 | found as infrared receivers on DVB sticks or on framegrabber cards. | |
96 | Via ir-keytable the mapping from a scancode to the generated event can | |
31abdcf1 JB |
97 | be customized and made persistent. |
98 | ||
99 | %description -n ir-keytable -l pl.UTF-8 | |
100 | ir-keytable to narzędzie pozwalające na zrzucanie, wczytywanie i | |
101 | modyfikowanie tablic wejściowych odbiorników podczerwieni (IR). Ten | |
102 | pakiet pozwala na zmianę tablic klawiszy odbiorników pilotów. | |
103 | Odbiorniki podczerwieni występują na interfejsach DVB lub kartach | |
104 | framegrabberów. Dzięki użyciu ir-keytable można zmienić i zachować | |
105 | odwzorowania między skankodami a generowanymi zdarzeniami. | |
5872d924 | 106 | |
24a22ca1 JB |
107 | %package -n libv4l |
108 | Summary: Abstraction layer on top of video4linux2 devices | |
109 | Summary(pl.UTF-8): Warstwa abstrakcji dla urządzeń video4linux2 | |
110 | License: LGPL v2.1+ | |
111 | Group: Libraries | |
5872d924 | 112 | |
24a22ca1 JB |
113 | %description -n libv4l |
114 | Collection of libraries which adds a thin abstraction layer on top of | |
115 | video4linux2 devices. The purpose of this (thin) layer is to make it | |
116 | easy for application writers to support a wide variety of devices | |
117 | without having to write seperate code for different devices in the | |
118 | same class. | |
5872d924 | 119 | |
24a22ca1 JB |
120 | %description -n libv4l -l pl.UTF-8 |
121 | libv4l to zestaw bibliotek dodający niewielką warstwę abstrakcji dla | |
122 | urządzeń video4linux2. Celem tej warstwy jest ułatwienie autorom | |
123 | aplikacji obsługi szerokiej gamy urządzeń bez pisania osobnego kodu | |
124 | dla różnych urządzeń tej samej klasy. | |
5872d924 | 125 | |
24a22ca1 JB |
126 | %package -n libv4l-devel |
127 | Summary: Header files for libv4l libraries | |
128 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek libv4l | |
129 | License: LGPL v2.1+ | |
130 | Group: Development/Libraries | |
131 | Requires: libv4l = %{version}-%{release} | |
460b2a5e | 132 | Requires: udev-devel |
24a22ca1 JB |
133 | |
134 | %description -n libv4l-devel | |
135 | Header files for libv4l libraries. | |
136 | ||
137 | %description -n libv4l-devel -l pl.UTF-8 | |
138 | Pliki nagłówkowe bibliotek libv4l. | |
5872d924 | 139 | |
6081edf3 JB |
140 | %package -n libv4l-static |
141 | Summary: Static libv4l libraries | |
142 | Summary(pl.UTF-8): Statyczne biblioteki libv4l | |
143 | License: LGPL v2.1+ | |
144 | Group: Development/Libraries | |
145 | Requires: libv4l-devel = %{version}-%{release} | |
146 | ||
147 | %description -n libv4l-static | |
148 | Static libv4l libraries. | |
149 | ||
150 | %description -n libv4l-static -l pl.UTF-8 | |
151 | Statyczne biblioteki libv4l. | |
152 | ||
e95e4963 JB |
153 | %package -n libv4l-apidocs |
154 | Summary: API documentation for libv4l libraries | |
155 | Summary(pl.UTF-8): Dokumentacja API biblioteki libv4l | |
156 | Group: Documentation | |
157 | BuildArch: noarch | |
158 | ||
159 | %description -n libv4l-apidocs | |
160 | API documentation for libv4l libraries. | |
161 | ||
162 | %description -n libv4l-apidocs -l pl.UTF-8 | |
163 | Dokumentacja API biblioteki libv4l. | |
164 | ||
ae2856e0 JB |
165 | %package -n iconv-v4l |
166 | Summary: Conversion modules for TV broadcasting encodings | |
167 | Summary(pl.UTF-8): Moduły konwersji do kodowań używanych w telewizji | |
168 | Group: Libraries | |
169 | Requires: iconv | |
170 | ||
171 | %description -n iconv-v4l | |
172 | Conversion modules for TV broadcasting encodings: ARIB-STD-B24, | |
173 | EN300-468-TAB00. | |
174 | ||
175 | %description -n iconv-v4l -l pl.UTF-8 | |
176 | Moduły konwersji do kodowań używanych w telewizji: ARIB-STD-B24, | |
177 | EN300-468-TAB00. | |
178 | ||
aac6eedb | 179 | %prep |
24a22ca1 JB |
180 | %setup -q |
181 | ||
aac6eedb | 182 | %build |
b876956f JP |
183 | %meson build \ |
184 | %{!?with_static_libs:--default-library=shared} \ | |
e95e4963 | 185 | %{!?with_apidocs:-Ddoxygen-doc=false} \ |
b876956f | 186 | -Dlibdvbv5=enabled \ |
aaedf326 | 187 | %if %{without qt} |
b876956f JP |
188 | -Dqv4l2=disabled \ |
189 | -Dqvidcap=disabled \ | |
aaedf326 | 190 | %endif |
460b2a5e | 191 | |
b876956f | 192 | %ninja_build -C build |
aac6eedb SP |
193 | |
194 | %install | |
195 | rm -rf $RPM_BUILD_ROOT | |
76c43ba6 | 196 | |
b876956f | 197 | %ninja_install -C build |
aac6eedb | 198 | |
b876956f JP |
199 | install build/contrib/rds-saa6588/rds-saa6588 $RPM_BUILD_ROOT%{_bindir} |
200 | install build/contrib/xc3028-firmware/xc3028-firmware $RPM_BUILD_ROOT%{_bindir}/xc3028-firmware | |
6081edf3 | 201 | |
ae2856e0 JB |
202 | install -d $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.d |
203 | %{__mv} $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules $RPM_BUILD_ROOT%{_libdir}/gconv/gconv-modules.d/gconv-modules-v4l.conf | |
204 | ||
c4427349 JB |
205 | %find_lang libdvbv5 |
206 | %find_lang v4l-utils | |
207 | ||
eb367d89 JB |
208 | # for find-debuginfo.sh |
209 | export EXCLUDE_FROM_STRIP="%{_noautostrip}" | |
210 | ||
aac6eedb SP |
211 | %clean |
212 | rm -rf $RPM_BUILD_ROOT | |
213 | ||
8e5bbdd5 JP |
214 | %post qt |
215 | %update_desktop_database_post | |
216 | %update_icon_cache hicolor | |
217 | ||
218 | %postun qt | |
219 | %update_desktop_database_postun | |
220 | %update_icon_cache hicolor | |
221 | ||
311fd358 JB |
222 | # handle transition from libv4l 0.8.x (.so.0 used to be libraries, not symlinks) |
223 | %pretrans -n libv4l | |
224 | for f in libv4l1 libv4l2 libv4lconvert ; do | |
225 | if [ ! -h %{_libdir}/${f}.so.0 ]; then | |
226 | rm -f %{_libdir}/${f}.so.0 | |
227 | fi | |
228 | done | |
229 | ||
24a22ca1 JB |
230 | %post -n libv4l -p /sbin/ldconfig |
231 | %postun -n libv4l -p /sbin/ldconfig | |
aac6eedb | 232 | |
ae2856e0 JB |
233 | %posttrans -n iconv-v4l |
234 | %{_sbindir}/iconvconfig --nostdlib -o %{_libdir}/gconv/gconv-modules.cache %{_libdir}/gconv | |
235 | ||
c4427349 | 236 | %files -f v4l-utils.lang |
aac6eedb | 237 | %defattr(644,root,root,755) |
f84ff99b | 238 | %doc ChangeLog README.md TODO contrib/{cobalt-ctl,parsers,pci_traffic} |
1e5a2ab1 JB |
239 | %attr(755,root,root) %{_bindir}/cec-compliance |
240 | %attr(755,root,root) %{_bindir}/cec-ctl | |
241 | %attr(755,root,root) %{_bindir}/cec-follower | |
31abdcf1 | 242 | %attr(755,root,root) %{_bindir}/cx18-ctl |
5872d924 | 243 | %attr(755,root,root) %{_bindir}/decode_tm6000 |
a82e0b64 JB |
244 | %attr(755,root,root) %{_bindir}/dvb-fe-tool |
245 | %attr(755,root,root) %{_bindir}/dvb-format-convert | |
1e5a2ab1 | 246 | %attr(755,root,root) %{_bindir}/dvbv5-daemon |
a82e0b64 JB |
247 | %attr(755,root,root) %{_bindir}/dvbv5-scan |
248 | %attr(755,root,root) %{_bindir}/dvbv5-zap | |
1e5a2ab1 | 249 | %attr(755,root,root) %{_bindir}/ir-ctl |
31abdcf1 | 250 | %attr(755,root,root) %{_bindir}/ivtv-ctl |
7f6240d5 | 251 | %attr(755,root,root) %{_bindir}/media-ctl |
6081edf3 | 252 | %attr(755,root,root) %{_bindir}/rds-ctl |
5872d924 | 253 | %attr(755,root,root) %{_bindir}/rds-saa6588 |
6081edf3 JB |
254 | %attr(755,root,root) %{_bindir}/v4l2-compliance |
255 | %attr(755,root,root) %{_bindir}/v4l2-ctl | |
256 | %attr(755,root,root) %{_bindir}/v4l2-sysfs-path | |
b5e330f3 | 257 | %attr(755,root,root) %{_bindir}/v4l2-tracer |
5872d924 TP |
258 | %attr(755,root,root) %{_bindir}/xc3028-firmware |
259 | %attr(755,root,root) %{_sbindir}/v4l2-dbg | |
1e5a2ab1 JB |
260 | %{_mandir}/man1/cec-compliance.1* |
261 | %{_mandir}/man1/cec-ctl.1* | |
262 | %{_mandir}/man1/cec-follower.1* | |
66a59e17 JB |
263 | %{_mandir}/man1/dvb-fe-tool.1* |
264 | %{_mandir}/man1/dvb-format-convert.1* | |
265 | %{_mandir}/man1/dvbv5-scan.1* | |
266 | %{_mandir}/man1/dvbv5-zap.1* | |
1e5a2ab1 | 267 | %{_mandir}/man1/ir-ctl.1* |
c4427349 JB |
268 | %{_mandir}/man1/v4l2-compliance.1* |
269 | %{_mandir}/man1/v4l2-ctl.1* | |
b5e330f3 | 270 | %{_mandir}/man1/v4l2-tracer.1* |
5872d924 | 271 | |
aaedf326 | 272 | %if %{with qt} |
24a22ca1 JB |
273 | %files qt |
274 | %defattr(644,root,root,755) | |
5872d924 | 275 | %attr(755,root,root) %{_bindir}/qv4l2 |
bd0fd6e5 | 276 | %attr(755,root,root) %{_bindir}/qvidcap |
5872d924 | 277 | %{_desktopdir}/qv4l2.desktop |
bd0fd6e5 | 278 | %{_desktopdir}/qvidcap.desktop |
5872d924 | 279 | %{_iconsdir}/hicolor/*/apps/qv4l2.* |
bd0fd6e5 | 280 | %{_iconsdir}/hicolor/*/apps/qvidcap.* |
7f6240d5 | 281 | %{_mandir}/man1/qv4l2.1* |
bd0fd6e5 | 282 | %{_mandir}/man1/qvidcap.1* |
aaedf326 | 283 | %endif |
24a22ca1 JB |
284 | |
285 | %files -n ir-keytable | |
286 | %defattr(644,root,root,755) | |
31abdcf1 | 287 | %dir %{_sysconfdir}/rc_keymaps |
31abdcf1 | 288 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rc_maps.cfg |
6bc65ad4 | 289 | %{systemdunitdir}/systemd-udevd.service.d/50-rc_keymap.conf |
6081edf3 | 290 | /lib/udev/rc_keymaps |
24a22ca1 JB |
291 | /lib/udev/rules.d/70-infrared.rules |
292 | %attr(755,root,root) %{_bindir}/ir-keytable | |
293 | %{_mandir}/man1/ir-keytable.1* | |
1a46076a | 294 | %{_mandir}/man5/rc_keymap.5* |
24a22ca1 | 295 | |
c4427349 | 296 | %files -n libv4l -f libdvbv5.lang |
24a22ca1 | 297 | %defattr(644,root,root,755) |
6081edf3 JB |
298 | %attr(755,root,root) %{_libdir}/libdvbv5.so.*.*.* |
299 | %attr(755,root,root) %ghost %{_libdir}/libdvbv5.so.0 | |
300 | %attr(755,root,root) %{_libdir}/libv4l1.so.*.*.* | |
301 | %attr(755,root,root) %ghost %{_libdir}/libv4l1.so.0 | |
302 | %attr(755,root,root) %{_libdir}/libv4l2.so.*.*.* | |
303 | %attr(755,root,root) %ghost %{_libdir}/libv4l2.so.0 | |
304 | %attr(755,root,root) %{_libdir}/libv4l2rds.so.*.*.* | |
305 | %attr(755,root,root) %ghost %{_libdir}/libv4l2rds.so.0 | |
306 | %attr(755,root,root) %{_libdir}/libv4lconvert.so.*.*.* | |
307 | %attr(755,root,root) %ghost %{_libdir}/libv4lconvert.so.0 | |
b5e330f3 | 308 | %attr(755,root,root) %{_libdir}/libv4l2tracer.so |
31abdcf1 | 309 | %dir %{_libdir}/libv4l |
6081edf3 JB |
310 | %attr(755,root,root) %{_libdir}/libv4l/ov511-decomp |
311 | %attr(755,root,root) %{_libdir}/libv4l/ov518-decomp | |
312 | %attr(755,root,root) %{_libdir}/libv4l/v4l1compat.so | |
313 | %attr(755,root,root) %{_libdir}/libv4l/v4l2convert.so | |
d6976fe7 JB |
314 | %dir %{_libdir}/libv4l/plugins |
315 | %attr(755,root,root) %{_libdir}/libv4l/plugins/libv4l-mplane.so | |
24a22ca1 JB |
316 | |
317 | %files -n libv4l-devel | |
318 | %defattr(644,root,root,755) | |
319 | %doc README.lib* | |
6081edf3 | 320 | %attr(755,root,root) %{_libdir}/libdvbv5.so |
31abdcf1 JB |
321 | %attr(755,root,root) %{_libdir}/libv4l1.so |
322 | %attr(755,root,root) %{_libdir}/libv4l2.so | |
6081edf3 | 323 | %attr(755,root,root) %{_libdir}/libv4l2rds.so |
31abdcf1 | 324 | %attr(755,root,root) %{_libdir}/libv4lconvert.so |
24a22ca1 | 325 | %{_includedir}/libv4l*.h |
7f6240d5 | 326 | %{_includedir}/libdvbv5 |
6081edf3 | 327 | %{_pkgconfigdir}/libdvbv5.pc |
31abdcf1 JB |
328 | %{_pkgconfigdir}/libv4l1.pc |
329 | %{_pkgconfigdir}/libv4l2.pc | |
6081edf3 | 330 | %{_pkgconfigdir}/libv4l2rds.pc |
31abdcf1 | 331 | %{_pkgconfigdir}/libv4lconvert.pc |
6081edf3 | 332 | |
a3c18cab | 333 | %if %{with static_libs} |
6081edf3 JB |
334 | %files -n libv4l-static |
335 | %defattr(644,root,root,755) | |
336 | %{_libdir}/libdvbv5.a | |
337 | %{_libdir}/libv4l1.a | |
338 | %{_libdir}/libv4l2.a | |
339 | %{_libdir}/libv4l2rds.a | |
340 | %{_libdir}/libv4lconvert.a | |
a3c18cab | 341 | %endif |
e95e4963 JB |
342 | |
343 | %if %{with apidocs} | |
344 | %files -n libv4l-apidocs | |
345 | %defattr(644,root,root,755) | |
346 | %{_docdir}/v4l-utils | |
347 | %endif | |
ae2856e0 JB |
348 | |
349 | %files -n iconv-v4l | |
350 | %defattr(644,root,root,755) | |
351 | %attr(755,root,root) %{_libdir}/gconv/ARIB-STD-B24.so | |
352 | %attr(755,root,root) %{_libdir}/gconv/EN300-468-TAB00.so | |
353 | %{_libdir}/gconv/gconv-modules.d/gconv-modules-v4l.conf |