]> git.pld-linux.org Git - packages/lirc.git/blob - lirc.spec
- drivers are only used for kernel build
[packages/lirc.git] / lirc.spec
1 # TODO
2 # - restore lirc_parallel driver
3 # - try to make it use builder_kernel_modules and install_kernel_modules; I couldn't make it
4 # - build is running kernel arch dependent, try to get rid of this
5 # - libcaraca_client (http://caraca.sourceforge.net/) - no releases yet
6 # - create modprobe alias files instead of reminding in post scriptlets
7 #
8 # Conditional build:
9 %bcond_without  dist_kernel     # without sources of distribution kernel
10 %bcond_without  kernel          # don't build kernel modules, only library+programs
11 %bcond_without  userspace       # build only packages with kernel modules
12 %bcond_with     svga            # without svgalib-based utility
13 %bcond_without  x               # without X11-based utilitied
14
15 %if %{without kernel}
16 %undefine       with_dist_kernel
17 %endif
18
19 # The goal here is to have main, userspace, package built once with
20 # simple release number, and only rebuild kernel packages with kernel
21 # version as part of release number, without the need to bump release
22 # with every kernel change.
23 %if 0%{?_pld_builder:1} && %{with kernel} && %{with userspace}
24 %{error:kernel and userspace cannot be built at the same time on PLD builders}
25 exit 1
26 %endif
27
28 %if "%{_alt_kernel}" != "%{nil}"
29 %if 0%{?build_kernels:1}
30 %{error:alt_kernel and build_kernels are mutually exclusive}
31 exit 1
32 %endif
33 %undefine       with_userspace
34 %global         _build_kernels          %{alt_kernel}
35 %else
36 %global         _build_kernels          %{?build_kernels:,%{?build_kernels}}
37 %endif
38
39 %if %{without userspace}
40 # nothing to be placed to debuginfo package
41 %define         _enable_debug_packages  0
42 %endif
43
44 %define         kbrs    %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo "BuildRequires:kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2" ; done)
45 %define         kpkg    %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%kernel_pkg ; echo %%kernel_pkg_scriptlets ; done)
46 %define         bkpkg   %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%build_kernel_pkg ; done)
47
48 %define         pname   lirc
49 %define         rel     104
50
51 #
52 # main package
53 #
54 # lirc_gpio fails to build under kernel >= 2.6.23
55 #
56 %if %{with kernel}
57 %if %{_kernel_version_code} >= %{_kernel_version_magic 2 6 23}
58 %if %{_kernel_version_code} >= %{_kernel_version_magic 3 0 0}
59 %define         drivers         "lirc_atiusb lirc_bt829 lirc_dev lirc_i2c lirc_igorplugusb lirc_imon lirc_parallel lirc_sasem lirc_serial lirc_sir lirc_ttusbir"
60 %else
61 %define         drivers         "lirc_atiusb lirc_bt829 lirc_dev lirc_i2c lirc_igorplugusb lirc_imon lirc_parallel lirc_sasem lirc_serial lirc_sir lirc_ttusbir lirc_wpc8769l"
62 %endif
63 %else
64 %define         drivers         "lirc_atiusb lirc_bt829 lirc_dev lirc_gpio lirc_i2c lirc_igorplugusb lirc_imon lirc_parallel lirc_sasem lirc_serial lirc_sir lirc_ttusbir lirc_wpc8769l"
65 %endif
66 %endif
67 Summary:        Linux Infrared Remote Control daemons
68 Summary(pl.UTF-8):      Serwery do zdalnego sterowania Linuksem za pomocą podczerwieni
69 Name:           %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
70 Version:        0.9.0
71 Release:        %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
72 License:        GPL v2+
73 Group:          Daemons
74 Source0:        http://downloads.sourceforge.net/lirc/%{pname}-%{version}.tar.bz2
75 # Source0-md5:  b232aef26f23fe33ea8305d276637086
76 Source1:        http://lirc.sourceforge.net/remotes.tar.bz2
77 # Source1-md5:  238d1773d3c405acc02813674f5a55f8
78 Source2:        %{pname}d.sysconfig
79 Source3:        %{pname}d.init
80 Source4:        %{pname}md.init
81 Source5:        %{pname}.tmpfiles
82 Patch0:         %{pname}-opt.patch
83 Patch1:         %{pname}-tmp.patch
84 Patch2:         %{pname}-no-svgalib.patch
85 Patch3:         %{pname}-kernel.patch
86 Patch4:         %{pname}-sparc.patch
87 Patch5:         %{pname}-remotes.patch
88 Patch6:         %{pname}-kernelcc.patch
89 Patch7:         format-security.patch
90 Patch8:         %{pname}-am.patch
91 URL:            http://www.lirc.org/
92 BuildRequires:  alsa-lib-devel
93 BuildRequires:  autoconf >= 2.50
94 BuildRequires:  automake
95 BuildRequires:  iguanaIR-devel
96 BuildRequires:  libftdi-devel >= 0.12
97 BuildRequires:  libirman-devel >= 0.4.5
98 BuildRequires:  libtool
99 BuildRequires:  libusb-compat-devel >= 0.1.0
100 BuildRequires:  rpmbuild(macros) >= 1.679
101 %{?with_dist_kernel:%{expand:%kbrs}}
102 BuildRequires:  rpm-pythonprov
103 %{?with_svga:BuildRequires:     svgalib-devel}
104 %{?with_x:BuildRequires:        xorg-lib-libX11-devel}
105 Requires(post,preun):   /sbin/chkconfig
106 BuildRequires:  rpmbuild(macros) >= 1.268
107 Requires:       %{pname}-libs = %{version}-%{release}
108 Requires:       libftdi >= 0.12
109 Requires:       rc-scripts
110 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
111
112 %if %{without userspace}
113 %define         no_spec_install_post_check_tmpfiles     1
114 %endif
115
116 %description
117 LIRC is a package that allows you to decode and send infra-red signals
118 of many (but not all) commonly used remote controls.
119
120 %description -l pl.UTF-8
121 LIRC to program pozwalający na dekodowanie nadchodzących oraz
122 wysyłanie sygnałów w podczerwieni za pomocą wielu (ale nie wszystkich)
123 popularnych urządzeń do zdalnego sterowania.
124
125 %package remotes
126 Summary:        Lirc remotes database
127 Summary(pl.UTF-8):      Baza pilotów obsługiwanych przez lirc
128 Group:          Documentation
129 Requires:       %{pname} = %{version}-%{rel}
130
131 %description remotes
132 This package contains configuration files for many remotes supported
133 by lirc.
134
135 %description remotes -l pl.UTF-8
136 Ten pakiet zawiera pliki konfiguracyjne dla wielu pilotów
137 obsługiwanych przez lirc.
138
139 %package X11
140 Summary:        Linux Infrared Remote Control - X11 utilities
141 Summary(pl.UTF-8):      Zdalne sterowanie Linuksem za pomocą podczerwieni - narzędzia X11
142 Group:          X11/Applications
143 Requires:       %{pname}-libs = %{version}-%{release}
144
145 %description X11
146 Linux Infrared Remote Control - X11 utilities.
147
148 %description X11 -l pl.UTF-8
149 Zdalne sterowanie Linuksem za pomocą podczerwieni - narzędzia X11.
150
151 %package svga
152 Summary:        Linux Infrared Remote Control - svgalib utilities
153 Summary(pl.UTF-8):      Zdalne sterowanie Linuksem za pomocą podczerwieni - narzędzia svgalib
154 Group:          Applications
155 Requires:       %{pname}-libs = %{version}-%{release}
156
157 %description svga
158 Linux Infrared Remote Control - svgalib-based utilities.
159
160 %description svga -l pl.UTF-8
161 Zdalne sterowanie Linuksem za pomocą podczerwieni - narzędzia oparte
162 na svgalibie.
163
164 %package libs
165 Summary:        LIRC libraries
166 Summary(pl.UTF-8):      Biblioteki LIRC
167 Group:          Libraries
168 Conflicts:      lirc < 0.6.3-3
169 # didn't use /tmp/.lircd
170
171 %description libs
172 This package provides the libraries necessary to run lirc client
173 programs.
174
175 %description libs -l pl.UTF-8
176 Ten pakiet zawiera biblioteki niezbędne do działania klientów LIRC.
177
178 %package devel
179 Summary:        Header files for LIRC development
180 Summary(pl.UTF-8):      Pliki nagłówkowe do tworzenia programów z obsługą LIRC
181 Group:          Development/Libraries
182 Requires:       %{pname}-libs = %{version}-%{release}
183
184 %description devel
185 This package provides the files necessary to develop LIRC-based
186 programs.
187
188 %description devel -l pl.UTF-8
189 Ten pakiet zawiera pliki niezbędne do tworzenia programów opartych na
190 LIRC.
191
192 %package static
193 Summary:        Static library for LIRC development
194 Summary(pl.UTF-8):      Biblioteka statyczna LIRC
195 Group:          Development/Libraries
196 Requires:       %{pname}-devel = %{version}-%{release}
197
198 %description static
199 The files necessary for development of statically-linked lirc-based
200 programs.
201
202 %description static -l pl.UTF-8
203 Pliki potrzebne do tworzenia łączonych statycznie programów opartych
204 na LIRC.
205
206 %define kernel_pkg()\
207 %package -n kernel%{_alt_kernel}-char-lirc-atiusb\
208 Summary:        Kernel modules for Linux Infrared Remote Control\
209 Summary(pl.UTF-8):      Moduły jądra dla zdalnej obsługi Linuksa za pomocą podczerwieni\
210 Release:        %{rel}@%{_kernel_ver_str}\
211 Group:          Base/Kernel\
212 %if %{with dist_kernel}\
213 %requires_releq_kernel\
214 Requires(postun):       %releq_kernel\
215 %endif\
216 Requires(post,postun):  /sbin/depmod\
217 Requires:       %{pname} = %{version}\
218 Conflicts:      dev < 2.8.0-3\
219 \
220 %description -n kernel%{_alt_kernel}-char-lirc-atiusb\
221 This package contains the kernel modules necessary to operate some\
222 infrared remote control devices (such as the ones bundled with TV\
223 cards).\
224 \
225 lirc_atiusb module.\
226 \
227 %description -n kernel%{_alt_kernel}-char-lirc-atiusb -l pl.UTF-8\
228 Ten pakiet zawiera moduły jądra niezbędne do obsługi niektórych\
229 pilotów na podczerwień (w tym tych dostarczanych z kartami TV).\
230 \
231 Moduł lirc_atiusb.\
232 \
233 %package -n kernel%{_alt_kernel}-char-lirc-bt829\
234 Summary:        Kernel modules for Linux Infrared Remote Control\
235 Summary(pl.UTF-8):      Moduły jądra dla zdalnej obsługi Linuksa za pomocą podczerwieni\
236 Release:        %{rel}@%{_kernel_ver_str}\
237 Group:          Base/Kernel\
238 %if %{with dist_kernel}\
239 %requires_releq_kernel\
240 Requires(postun):       %releq_kernel\
241 %endif\
242 Requires(post,postun):  /sbin/depmod\
243 Requires:       %{pname} = %{version}\
244 Conflicts:      dev < 2.8.0-3\
245 \
246 %description -n kernel%{_alt_kernel}-char-lirc-bt829\
247 This package contains the kernel modules necessary to operate some\
248 infrared remote control devices (such as the ones bundled with TV\
249 cards).\
250 \
251 lirc_bt829 module.\
252 \
253 %description -n kernel%{_alt_kernel}-char-lirc-bt829 -l pl.UTF-8\
254 Ten pakiet zawiera moduły jądra niezbędne do obsługi niektórych\
255 pilotów na podczerwień (w tym tych dostarczanych z kartami TV).\
256 \
257 Moduł lirc_bt829.\
258 \
259 %package -n kernel%{_alt_kernel}-char-lirc-dev\
260 Summary:        Kernel modules for Linux Infrared Remote Control\
261 Summary(pl.UTF-8):      Moduły jądra dla zdalnej obsługi Linuksa za pomocą podczerwieni\
262 Release:        %{rel}@%{_kernel_ver_str}\
263 Group:          Base/Kernel\
264 %if %{with dist_kernel}\
265 %requires_releq_kernel\
266 Requires(postun):       %releq_kernel\
267 %endif\
268 Requires(post,postun):  /sbin/depmod\
269 Requires:       %{pname} = %{version}\
270 Obsoletes:      lirc-modules\
271 Obsoletes:      lirc-modules-dev\
272 Conflicts:      dev < 2.8.0-3\
273 \
274 %description -n kernel%{_alt_kernel}-char-lirc-dev\
275 This package contains the kernel modules necessary to operate some\
276 infrared remote control devices (such as the ones bundled with TV\
277 cards).\
278 \
279 lirc_dev module.\
280 \
281 %description -n kernel%{_alt_kernel}-char-lirc-dev -l pl.UTF-8\
282 Ten pakiet zawiera moduły jądra niezbędne do obsługi niektórych\
283 pilotów na podczerwień (w tym tych dostarczanych z kartami TV).\
284 \
285 Moduł lirc_dev.\
286 \
287 %package -n kernel%{_alt_kernel}-char-lirc-ene0100\
288 Summary:        Kernel modules for Linux Infrared Remote Control\
289 Summary(pl.UTF-8):      Moduły jądra dla zdalnej obsługi Linuksa za pomocą podczerwieni\
290 Release:        %{rel}@%{_kernel_ver_str}\
291 Group:          Base/Kernel\
292 %if %{with dist_kernel}\
293 %requires_releq_kernel\
294 Requires(postun):       %releq_kernel\
295 %endif\
296 Requires(post,postun):  /sbin/depmod\
297 Requires:       %{pname} = %{version}\
298 Obsoletes:      lirc-modules\
299 Conflicts:      dev < 2.8.0-3\
300 \
301 %description -n kernel%{_alt_kernel}-char-lirc-ene0100\
302 This package contains the kernel modules necessary to operate some\
303 infrared remote control ene0100ices (such as the ones bundled with TV\
304 cards).\
305 \
306 lirc_ene0100 module.\
307 \
308 %description -n kernel%{_alt_kernel}-char-lirc-ene0100 -l pl.UTF-8\
309 Ten pakiet zawiera moduły jądra niezbędne do obsługi niektórych\
310 pilotów na podczerwień (w tym tych dostarczanych z kartami TV).\
311 \
312 Moduł lirc_ene0100.\
313 \
314 %package -n kernel%{_alt_kernel}-char-lirc-gpio\
315 Summary:        Kernel modules for Linux Infrared Remote Control\
316 Summary(pl.UTF-8):      Moduły jądra dla zdalnej obsługi Linuksa za pomocą podczerwieni\
317 Release:        %{rel}@%{_kernel_ver_str}\
318 Group:          Base/Kernel\
319 %if %{with dist_kernel}\
320 %requires_releq_kernel\
321 Requires(postun):       %releq_kernel\
322 %endif\
323 Requires(post,postun):  /sbin/depmod\
324 Requires:       %{pname} = %{version}\
325 Obsoletes:      lirc-modules\
326 Obsoletes:      lirc-modules-gpio\
327 Conflicts:      dev < 2.8.0-3\
328 \
329 %description -n kernel%{_alt_kernel}-char-lirc-gpio\
330 This package contains the kernel modules necessary to operate some\
331 infrared remote control devices (such as the ones bundled with TV\
332 cards).\
333 \
334 lirc_gpio module.\
335 \
336 %description -n kernel%{_alt_kernel}-char-lirc-gpio -l pl.UTF-8\
337 Ten pakiet zawiera moduły jądra niezbędne do obsługi niektórych\
338 pilotów na podczerwień (w tym tych dostarczanych z kartami TV).\
339 \
340 Moduł lirc_gpio.\
341 \
342 %package -n kernel%{_alt_kernel}-char-lirc-i2c\
343 Summary:        Kernel modules for Linux Infrared Remote Control\
344 Summary(pl.UTF-8):      Moduły jądra dla zdalnej obsługi Linuksa za pomocą podczerwieni\
345 Release:        %{rel}@%{_kernel_ver_str}\
346 Group:          Base/Kernel\
347 %if %{with dist_kernel}\
348 %requires_releq_kernel\
349 Requires(postun):       %releq_kernel\
350 %endif\
351 Requires(post,postun):  /sbin/depmod\
352 Requires:       %{pname} = %{version}\
353 Obsoletes:      lirc-modules\
354 Obsoletes:      lirc-modules-i2c\
355 Conflicts:      dev < 2.8.0-3\
356 \
357 %description -n kernel%{_alt_kernel}-char-lirc-i2c\
358 This package contains the kernel modules necessary to operate some\
359 infrared remote control devices (such as the ones bundled with TV\
360 cards).\
361 \
362 lirc_i2c module.\
363 \
364 %description -n kernel%{_alt_kernel}-char-lirc-i2c -l pl.UTF-8\
365 Ten pakiet zawiera moduły jądra niezbędne do obsługi niektórych\
366 pilotów na podczerwień (w tym tych dostarczanych z kartami TV).\
367 \
368 Moduł lirc_i2c.\
369 \
370 %package -n kernel%{_alt_kernel}-char-lirc-igorplugusb\
371 Summary:        Kernel modules for Linux Infrared Remote Control\
372 Summary(pl.UTF-8):      Moduły jądra dla zdalnej obsługi Linuksa za pomocą podczerwieni\
373 Release:        %{rel}@%{_kernel_ver_str}\
374 Group:          Base/Kernel\
375 %if %{with dist_kernel}\
376 %requires_releq_kernel\
377 Requires(postun):       %releq_kernel\
378 %endif\
379 Requires(post,postun):  /sbin/depmod\
380 Requires:       %{pname} = %{version}\
381 Obsoletes:      lirc-modules\
382 Obsoletes:      lirc-modules-igorplugusb\
383 Conflicts:      dev < 2.8.0-3\
384 \
385 %description -n kernel%{_alt_kernel}-char-lirc-igorplugusb\
386 This package contains the kernel modules necessary to operate some\
387 infrared remote control devices (such as the ones bundled with TV\
388 cards).\
389 \
390 lirc_igorplugusb module.\
391 \
392 %description -n kernel%{_alt_kernel}-char-lirc-igorplugusb -l pl.UTF-8\
393 Ten pakiet zawiera moduły jądra niezbędne do obsługi niektórych\
394 pilotów na podczerwień (w tym tych dostarczanych z kartami TV).\
395 \
396 Moduł lirc_igorplugusb.\
397 \
398 %package -n kernel%{_alt_kernel}-char-lirc-imon\
399 Summary:        Kernel modules for Linux Infrared Remote Control\
400 Summary(pl.UTF-8):      Moduły jądra dla zdalnej obsługi Linuksa za pomocą podczerwieni\
401 Release:        %{rel}@%{_kernel_ver_str}\
402 Group:          Base/Kernel\
403 %if %{with dist_kernel}\
404 %requires_releq_kernel\
405 Requires(postun):       %releq_kernel\
406 %endif\
407 Requires(post,postun):  /sbin/depmod\
408 Requires:       %{pname} = %{version}\
409 Obsoletes:      lirc-modules\
410 Obsoletes:      lirc-modules-imon\
411 Conflicts:      dev < 2.8.0-3\
412 \
413 %description -n kernel%{_alt_kernel}-char-lirc-imon\
414 This package contains the kernel modules necessary to operate some\
415 infrared remote control devices (such as the ones bundled with TV\
416 cards).\
417 \
418 lirc_imon module.\
419 \
420 %description -n kernel%{_alt_kernel}-char-lirc-imon -l pl.UTF-8\
421 Ten pakiet zawiera moduły jądra niezbędne do obsługi niektórych\
422 pilotów na podczerwień (w tym tych dostarczanych z kartami TV).\
423 \
424 Moduł lirc_imon.\
425 \
426 %package -n kernel%{_alt_kernel}-char-lirc-sasem\
427 Summary:        Kernel modules for Linux Infrared Remote Control\
428 Summary(pl.UTF-8):      Moduły jądra dla zdalnej obsługi Linuksa za pomocą podczerwieni\
429 Release:        %{rel}@%{_kernel_ver_str}\
430 Group:          Base/Kernel\
431 %if %{with dist_kernel}\
432 %requires_releq_kernel\
433 Requires(postun):       %releq_kernel\
434 %endif\
435 Requires(post,postun):  /sbin/depmod\
436 Requires:       %{pname} = %{version}\
437 Conflicts:      dev < 2.8.0-3\
438 \
439 %description -n kernel%{_alt_kernel}-char-lirc-sasem\
440 This package contains the kernel modules necessary to operate some\
441 infrared remote control devices (such as the ones bundled with TV\
442 cards).\
443 \
444 lirc_sasem module.\
445 \
446 %description -n kernel%{_alt_kernel}-char-lirc-sasem -l pl.UTF-8\
447 Ten pakiet zawiera moduły jądra niezbędne do obsługi niektórych\
448 pilotów na podczerwień (w tym tych dostarczanych z kartami TV).\
449 \
450 Moduł lirc_sasem.\
451 \
452 %package -n kernel%{_alt_kernel}-char-lirc-serial\
453 Summary:        Kernel modules for Linux Infrared Remote Control\
454 Summary(pl.UTF-8):      Moduły jądra dla zdalnej obsługi Linuksa za pomocą podczerwieni\
455 Release:        %{rel}@%{_kernel_ver_str}\
456 Group:          Base/Kernel\
457 %if %{with dist_kernel}\
458 %requires_releq_kernel\
459 Requires(postun):       %releq_kernel\
460 %endif\
461 Requires(post,postun):  /sbin/depmod\
462 Requires:       %{pname} = %{version}\
463 %{?with_dist_kernel:Requires:   setserial}\
464 Obsoletes:      lirc-modules\
465 Obsoletes:      lirc-modules-serial\
466 Conflicts:      dev < 2.8.0-3\
467 \
468 %description -n kernel%{_alt_kernel}-char-lirc-serial\
469 This package contains the kernel modules necessary to operate some\
470 infrared remote control devices (such as the ones bundled with TV\
471 cards).\
472 \
473 lirc_serial module for devices connected to serial port.\
474 \
475 %description -n kernel%{_alt_kernel}-char-lirc-serial -l pl.UTF-8\
476 Ten pakiet zawiera moduły jądra niezbędne do obsługi niektórych\
477 pilotów na podczerwień (w tym tych dostarczanych z kartami TV).\
478 \
479 Moduł lirc_serial dla urządzeń podłączanych do portu szeregowego.\
480 \
481 %package -n kernel%{_alt_kernel}-char-lirc-sir\
482 Summary:        Kernel modules for Linux Infrared Remote Control\
483 Summary(pl.UTF-8):      Moduły jądra dla zdalnej obsługi Linuksa za pomocą podczerwieni\
484 Release:        %{rel}@%{_kernel_ver_str}\
485 Group:          Base/Kernel\
486 %if %{with dist_kernel}\
487 %requires_releq_kernel\
488 Requires(postun):       %releq_kernel\
489 %endif\
490 Requires(post,postun):  /sbin/depmod\
491 Requires:       %{pname} = %{version}\
492 Obsoletes:      lirc-modules\
493 Obsoletes:      lirc-modules-sir\
494 Conflicts:      dev < 2.8.0-3\
495 \
496 %description -n kernel%{_alt_kernel}-char-lirc-sir\
497 This package contains the kernel modules necessary to operate some\
498 infrared remote control devices (such as the ones bundled with TV\
499 cards).\
500 \
501 lirc_sir module.\
502 \
503 %description -n kernel%{_alt_kernel}-char-lirc-sir -l pl.UTF-8\
504 Ten pakiet zawiera moduły jądra niezbędne do obsługi niektórych\
505 pilotów na podczerwień (w tym tych dostarczanych z kartami TV).\
506 \
507 Moduł lirc_sir.\
508 \
509 %package -n kernel%{_alt_kernel}-char-lirc-ttusbir\
510 Summary:        Kernel modules for Linux Infrared Remote Control\
511 Summary(pl.UTF-8):      Moduły jądra dla zdalnej obsługi Linuksa za pomocą podczerwieni\
512 Release:        %{rel}@%{_kernel_ver_str}\
513 Group:          Base/Kernel\
514 %if %{with dist_kernel}\
515 %requires_releq_kernel\
516 Requires(postun):       %releq_kernel\
517 %endif\
518 Requires(post,postun):  /sbin/depmod\
519 Requires:       %{pname} = %{version}\
520 Obsoletes:      lirc-modules\
521 Obsoletes:      lirc-modules-ttusbir\
522 Conflicts:      dev < 2.8.0-3\
523 \
524 %description -n kernel%{_alt_kernel}-char-lirc-ttusbir\
525 This package contains the kernel modules necessary to operate\
526 TechnoTrend USB IR Receiver.\
527 \
528 lirc_ttusbir module.\
529 \
530 %description -n kernel%{_alt_kernel}-char-lirc-ttusbir -l pl.UTF-8\
531 Ten pakiet zawiera moduł kernela niezbędny do obsługi urządzenia\
532 TechnoTrend USB IR Receiver.\
533 \
534 Moduł lirc_ttusbir.\
535 \
536 %package -n kernel%{_alt_kernel}-char-lirc-wpc87691\
537 Summary:        Kernel modules for Linux Infrared Remote Control\
538 Summary(pl.UTF-8):      Moduły jądra dla zdalnej obsługi Linuksa za pomocą podczerwieni\
539 Release:        %{rel}@%{_kernel_ver_str}\
540 Group:          Base/Kernel\
541 %if %{with dist_kernel}\
542 %requires_releq_kernel\
543 Requires(postun):       %releq_kernel\
544 %endif\
545 Requires(post,postun):  /sbin/depmod\
546 Requires:       %{pname} = %{version}\
547 Conflicts:      dev < 2.8.0-3\
548 \
549 %description -n kernel%{_alt_kernel}-char-lirc-wpc87691\
550 This package contains the kernel modules necessary to operate\
551 TechnoTrend USB IR Receiver.\
552 \
553 lirc_wpc87691 module.\
554 \
555 %description -n kernel%{_alt_kernel}-char-lirc-wpc87691 -l pl.UTF-8\
556 Ten pakiet zawiera moduł kernela niezbędny do obsługi urządzenia\
557 TechnoTrend USB IR Receiver.\
558 \
559 Moduł lirc_wpc87691.\
560 \
561 %package -n kernel%{_alt_kernel}-char-lirc-parallel\
562 Summary:        Kernel modules for Linux Infrared Remote Control\
563 Summary(pl.UTF-8):      Moduły jądra dla zdalnej obsługi Linuksa za pomocą podczerwieni\
564 Release:        %{rel}@%{_kernel_ver_str}\
565 Group:          Base/Kernel\
566 %if %{with dist_kernel}\
567 %requires_releq_kernel\
568 Requires(postun):       %releq_kernel\
569 %endif\
570 Requires(post,postun):  /sbin/depmod\
571 Requires:       %{pname} = %{version}\
572 Obsoletes:      lirc-modules\
573 Obsoletes:      lirc-modules-parallel\
574 Conflicts:      dev < 2.8.0-3\
575 \
576 %description -n kernel%{_alt_kernel}-char-lirc-parallel\
577 This package contains the kernel modules necessary to operate some\
578 infrared remote control devices (such as the ones bundled with TV\
579 cards).\
580 \
581 lirc-parallel module for devices connected to parallel port.\
582 \
583 %description -n kernel%{_alt_kernel}-char-lirc-parallel -l pl.UTF-8\
584 Ten pakiet zawiera moduły jądra niezbędne do obsługi niektórych\
585 pilotów na podczerwień (w tym tych dostarczanych z kartami TV).\
586 \
587 Moduł lirc_parallel dla urządzeń podłączanych do portu równoległego.\
588 \
589 %if %{with kernel}\
590 %files -n kernel%{_alt_kernel}-char-lirc-atiusb\
591 %defattr(644,root,root,755)\
592 /lib/modules/%{_kernel_ver}/misc/lirc_atiusb.ko*\
593 \
594 %files -n kernel%{_alt_kernel}-char-lirc-bt829\
595 %defattr(644,root,root,755)\
596 /lib/modules/%{_kernel_ver}/misc/lirc_bt829.ko*\
597 \
598 %files -n kernel%{_alt_kernel}-char-lirc-dev\
599 %defattr(644,root,root,755)\
600 /lib/modules/%{_kernel_ver}/misc/lirc_dev.ko*\
601 \
602 %if %{_kernel_version_code} < %{_kernel_version_magic 3 0 0}\
603 %files -n kernel%{_alt_kernel}-char-lirc-ene0100\
604 %defattr(644,root,root,755)\
605 /lib/modules/%{_kernel_ver}/misc/lirc_ene0100.ko*\
606 %endif\
607 \
608 %if %{_kernel_version_code} < %{_kernel_version_magic 2 6 23}\
609 %files -n kernel%{_alt_kernel}-char-lirc-gpio\
610 %defattr(644,root,root,755)\
611 /lib/modules/%{_kernel_ver}/misc/lirc_gpio.ko*\
612 %endif\
613 \
614 %files -n kernel%{_alt_kernel}-char-lirc-i2c\
615 %defattr(644,root,root,755)\
616 /lib/modules/%{_kernel_ver}/misc/lirc_i2c.ko*\
617 \
618 %files -n kernel%{_alt_kernel}-char-lirc-igorplugusb\
619 %defattr(644,root,root,755)\
620 /lib/modules/%{_kernel_ver}/misc/lirc_igorplugusb.ko*\
621 \
622 %files -n kernel%{_alt_kernel}-char-lirc-imon\
623 %defattr(644,root,root,755)\
624 /lib/modules/%{_kernel_ver}/misc/lirc_imon.ko*\
625 \
626 %files -n kernel%{_alt_kernel}-char-lirc-sasem\
627 %defattr(644,root,root,755)\
628 /lib/modules/%{_kernel_ver}/misc/lirc_sasem.ko*\
629 \
630 %files -n kernel%{_alt_kernel}-char-lirc-serial\
631 %defattr(644,root,root,755)\
632 /lib/modules/%{_kernel_ver}/misc/lirc_serial.ko*\
633 \
634 %files -n kernel%{_alt_kernel}-char-lirc-sir\
635 %defattr(644,root,root,755)\
636 /lib/modules/%{_kernel_ver}/misc/lirc_sir.ko*\
637 \
638 %files -n kernel%{_alt_kernel}-char-lirc-ttusbir\
639 %defattr(644,root,root,755)\
640 /lib/modules/%{_kernel_ver}/misc/lirc_ttusbir.ko*\
641 \
642 %if %{_kernel_version_code} < %{_kernel_version_magic 3 0 0}\
643 %files -n kernel%{_alt_kernel}-char-lirc-wpc87691\
644 %defattr(644,root,root,755)\
645 /lib/modules/%{_kernel_ver}/misc/lirc_wpc8769l.ko*\
646 %endif\
647 \
648 %files -n kernel%{_alt_kernel}-char-lirc-parallel\
649 %defattr(644,root,root,755)\
650 /lib/modules/%{_kernel_ver}/misc/lirc_parallel.ko*\
651 %endif\
652 %{nil}
653
654 %define kernel_pkg_scriptlets()\
655 %post   -n kernel%{_alt_kernel}-char-lirc-atiusb\
656 %depmod %{_kernel_ver}\
657 if [ "$1" = "1" ]; then\
658         echo "Don't forget to add an 'alias lirc lirc_atiusb' to modprobe config"\
659 fi\
660 \
661 %postun -n kernel%{_alt_kernel}-char-lirc-atiusb\
662 %depmod %{_kernel_ver}\
663 \
664 %post   -n kernel%{_alt_kernel}-char-lirc-bt829\
665 %depmod %{_kernel_ver}\
666 if [ "$1" = "1" ]; then\
667         echo "Don't forget to add an 'alias lirc lirc_bt829' to modprobe config"\
668 fi\
669 \
670 %postun -n kernel%{_alt_kernel}-char-lirc-bt829\
671 %depmod %{_kernel_ver}\
672 \
673 %post   -n kernel%{_alt_kernel}-char-lirc-dev\
674 %depmod %{_kernel_ver}\
675 \
676 %postun -n kernel%{_alt_kernel}-char-lirc-dev\
677 %depmod %{_kernel_ver}\
678 \
679 %post   -n kernel%{_alt_kernel}-char-lirc-ene0100\
680 %depmod %{_kernel_ver}\
681 \
682 %postun -n kernel%{_alt_kernel}-char-lirc-ene0100\
683 %depmod %{_kernel_ver}\
684 \
685 %post   -n kernel%{_alt_kernel}-char-lirc-gpio\
686 %depmod %{_kernel_ver}\
687 if [ "$1" = "1" ]; then\
688         echo "Don't forget to add an 'alias lirc lirc_gpio' to modprobe config"\
689 fi\
690 \
691 %postun -n kernel%{_alt_kernel}-char-lirc-gpio\
692 %depmod %{_kernel_ver}\
693 \
694 %post   -n kernel%{_alt_kernel}-char-lirc-i2c\
695 %depmod %{_kernel_ver}\
696 if [ "$1" = "1" ]; then\
697         echo "Don't forget to add an 'alias lirc lirc_i2c' to modprobe config"\
698 fi\
699 \
700 %postun -n kernel%{_alt_kernel}-char-lirc-i2c\
701 %depmod %{_kernel_ver}\
702 \
703 %post   -n kernel%{_alt_kernel}-char-lirc-igorplugusb\
704 %depmod %{_kernel_ver}\
705 if [ "$1" = "1" ]; then\
706         echo "Don't forget to add an 'alias lirc lirc_igorplugusb' to modprobe config"\
707 fi\
708 \
709 %postun -n kernel%{_alt_kernel}-char-lirc-igorplugusb\
710 %depmod %{_kernel_ver}\
711 \
712 %post   -n kernel%{_alt_kernel}-char-lirc-imon\
713 %depmod %{_kernel_ver}\
714 if [ "$1" = "1" ]; then\
715         echo "Don't forget to add an 'alias lirc lirc_imon' to modprobe config"\
716 fi\
717 \
718 %postun -n kernel%{_alt_kernel}-char-lirc-imon\
719 %depmod %{_kernel_ver}\
720 \
721 %post   -n kernel%{_alt_kernel}-char-lirc-sasem\
722 %depmod %{_kernel_ver}\
723 if [ "$1" = "1" ]; then\
724         echo "Don't forget to add an 'alias lirc lirc_sasem' to modprobe config"\
725 fi\
726 \
727 %postun -n kernel%{_alt_kernel}-char-lirc-sasem\
728 %depmod %{_kernel_ver}\
729 \
730 %post   -n kernel%{_alt_kernel}-char-lirc-serial\
731 %depmod %{_kernel_ver}\
732 if [ "$1" = "1" ]; then\
733         echo "Don't forget to add an 'alias lirc lirc_serial' to modprobe config"\
734 fi\
735 \
736 %postun -n kernel%{_alt_kernel}-char-lirc-serial\
737 %depmod %{_kernel_ver}\
738 \
739 %post   -n kernel%{_alt_kernel}-char-lirc-parallel\
740 %depmod %{_kernel_ver}\
741 if [ "$1" = "1" ]; then\
742         echo "Don't forget to add an 'alias lirc lirc_parallel' modprobe config"\
743 fi\
744 \
745 %postun -n kernel%{_alt_kernel}-char-lirc-parallel\
746 %depmod %{_kernel_ver}\
747 \
748 %post   -n kernel%{_alt_kernel}-char-lirc-sir\
749 %depmod %{_kernel_ver}\
750 if [ "$1" = "1" ]; then\
751         echo "Don't forget to add an 'alias lirc lirc_sir' to modprobe config"\
752 fi\
753 \
754 %postun -n kernel%{_alt_kernel}-char-lirc-sir\
755 %depmod %{_kernel_ver}\
756 \
757 %post   -n kernel%{_alt_kernel}-char-lirc-ttusbir\
758 %depmod %{_kernel_ver}\
759 if [ "$1" = "1" ]; then\
760         echo "Don't forget to add an 'alias lirc lirc_ttusbir' to modprobe config"\
761 fi\
762 \
763 %postun -n kernel%{_alt_kernel}-char-lirc-ttusbir\
764 %depmod %{_kernel_ver}\
765 \
766 %post   -n kernel%{_alt_kernel}-char-lirc-wpc87691\
767 %depmod %{_kernel_ver}\
768 if [ "$1" = "1" ]; then\
769         echo "Don't forget to add an 'alias lirc lirc_wpc87691' to modprobe config"\
770 fi\
771 \
772 %postun -n kernel%{_alt_kernel}-char-lirc-wpc87691\
773 %depmod %{_kernel_ver}\
774 %{nil}
775
776 %define build_kernel_pkg()\
777 %configure \\\
778         ac_cv_header_portaudio_h=no \\\
779         --with-kerneldir=%{_kernelsrcdir} \\\
780         %{?with_x:--with-x} \\\
781         --with-port=0x2f8 \\\
782         --with-irq=3 \\\
783         --without-soft-carrier \\\
784         --with-driver=userspace \\\
785         --with-igor\
786 \
787 drivers=%{drivers}\
788 for drv in $drivers; do\
789         cd drivers/$drv\
790         %{__make} clean \\\
791                 LIRC_DEVDIR=`pwd` \\\
792                 RCS_FIND_IGNORE="-name '*.ko' -o" \\\
793                 %{?with_verbose:V=1}\
794 \
795         %{__make} -j1 \\\
796                 LIRC_DEVDIR=`pwd` \\\
797                 CONSTIFY_PLUGIN="" \\\
798                 KBUILD_MODPOST_WARN=1 \\\
799                 %{?with_verbose:V=1}\
800         cd ../..\
801         %install_kernel_modules -D installed -m drivers/$drv/$drv -d misc\
802 done\
803 %{nil}
804
805 %{?with_kernel:%{expand:%kpkg}}
806
807 %prep
808 %setup -q -n %{pname}-%{version} -a 1
809 %patch0 -p1
810 %patch1 -p1
811 %if !%{with svga}
812 %patch2 -p1
813 %endif
814 %patch3 -p1
815 %patch4 -p1
816 %patch5 -p1
817 %patch6 -p1
818 %patch7 -p1
819 %patch8 -p1
820
821 %build
822 echo '#' > drivers/Makefile.am
823 %{__libtoolize}
824 %{__aclocal}
825 %{__automake}
826 %{__autoheader}
827 %{__autoconf}
828
829 %if %{with userspace}
830 %configure \
831         ac_cv_header_portaudio_h=no \
832 %if %{without kernel}
833         ac_cv_have_kernel="no_kernel=yes" \
834 %endif
835         --with-kerneldir=%{_kernelsrcdir} \
836         %{?with_x:--with-x} \
837         --with-port=0x2f8 \
838         --with-irq=3 \
839         --without-soft-carrier \
840         --with-driver=userspace \
841         --with-igor
842
843 %{__make} -j1
844 %endif
845
846 %{?with_kernel:%{expand:%bkpkg}}
847
848 %install
849 rm -rf $RPM_BUILD_ROOT
850 install -d $RPM_BUILD_ROOT
851
852 %if %{with kernel}
853 cp -a installed/* $RPM_BUILD_ROOT
854 %endif
855
856 %if %{with userspace}
857 install -d $RPM_BUILD_ROOT{%{_bindir},%{_aclocaldir},/dev,/var/{log,run/lirc}} \
858         $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,lirc} \
859         $RPM_BUILD_ROOT%{systemdtmpfilesdir}
860
861 %{__make} -j1 install \
862         DESTDIR=$RPM_BUILD_ROOT \
863         sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir}
864
865 cat>$RPM_BUILD_ROOT%{_sysconfdir}/lirc/lircd.conf<<END
866 #
867 # This is a placeholder for your configuration file.
868 # See %{_docdir}/%{pname}-%{version}/remotes for some examples.
869 #
870 END
871 cp -f $RPM_BUILD_ROOT%{_sysconfdir}/lirc/lirc{,m}d.conf
872 cp -p contrib/*.m4 $RPM_BUILD_ROOT%{_aclocaldir}
873 :> $RPM_BUILD_ROOT/var/log/lircd
874
875 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/lircd
876 install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/lircd
877 install -p %{SOURCE4} $RPM_BUILD_ROOT/etc/rc.d/init.d/lircmd
878 cp -p %{SOURCE5} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
879 %endif
880
881 %clean
882 rm -rf $RPM_BUILD_ROOT
883
884 %post   libs -p /sbin/ldconfig
885 %postun libs -p /sbin/ldconfig
886
887 %post
888 /sbin/chkconfig --add lircd
889 /sbin/chkconfig --add lircmd
890 %service lircd restart
891 %service lircmd restart
892
893 echo "If you are using a kernel-module-based driver, don't forget to"
894 echo "install the kernel%{_alt_kernel}-char-lirc-<your_driver> package."
895
896 %preun
897 if [ "$1" = "0" ]; then
898         %service lircd stop
899         %service lircmd stop
900         /sbin/chkconfig --del lircd
901         /sbin/chkconfig --del lircmd
902 fi
903
904 %triggerpostun -- %{name} < 0.8.6-8
905 if [ -f %{_sysconfdir}/lircd.conf.rpmsave ]; then
906         mv -f %{_sysconfdir}/lircd.conf.rpmsave %{_sysconfdir}/lirc/lircd.conf
907 fi
908 if [ -f %{_sysconfdir}/lircmd.conf.rpmsave ]; then
909         mv -f %{_sysconfdir}/lircmd.conf.rpmsave %{_sysconfdir}/lirc/lircmd.conf
910 fi
911
912 %if %{with userspace}
913 %files
914 %defattr(644,root,root,755)
915 %doc ANNOUNCE AUTHORS NEWS README TODO ChangeLog
916 %doc contrib/lircrc doc/{html,images,lirc.css}
917 %attr(755,root,root) %{_bindir}/ircat
918 %attr(755,root,root) %{_bindir}/irexec
919 %attr(755,root,root) %{_bindir}/irpty
920 %attr(755,root,root) %{_bindir}/irrecord
921 %attr(755,root,root) %{_bindir}/irsend
922 %attr(755,root,root) %{_bindir}/irw
923 %attr(755,root,root) %{_bindir}/mode2
924 %attr(755,root,root) %{_bindir}/lircrcd
925 %attr(755,root,root) %{_bindir}/pronto2lirc
926 %attr(755,root,root) %{_sbindir}/lircd
927 %attr(755,root,root) %{_sbindir}/lircmd
928 %attr(754,root,root) /etc/rc.d/init.d/lircd
929 %attr(754,root,root) /etc/rc.d/init.d/lircmd
930 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/lircd
931 %dir %{_sysconfdir}/lirc
932 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lirc/lircd.conf
933 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lirc/lircmd.conf
934 %{_mandir}/man1/ircat.1*
935 %{_mandir}/man1/irexec.1*
936 %{_mandir}/man1/irpty.1*
937 %{_mandir}/man1/irrecord.1*
938 %{_mandir}/man1/irsend.1*
939 %{_mandir}/man1/irw.1*
940 %{_mandir}/man1/lircrcd.1*
941 %{_mandir}/man1/mode2.1*
942 %{_mandir}/man8/lircd.8*
943 %{_mandir}/man8/lircmd.8*
944 %attr(600,root,root) %ghost /var/log/lircd
945 %dir /var/run/lirc
946 %{systemdtmpfilesdir}/%{name}.conf
947
948 %files remotes
949 %defattr(644,root,root,755)
950 # XXX: are jpegs in docs (remotes) a good idea?
951 %doc remotes
952
953 %if %{with x}
954 %files X11
955 %defattr(644,root,root,755)
956 %doc doc/irxevent.keys
957 %attr(755,root,root) %{_bindir}/irxevent
958 %attr(755,root,root) %{_bindir}/xmode2
959 %{_mandir}/man1/irxevent.1*
960 %{_mandir}/man1/xmode2.1*
961 %endif
962
963 %if %{with svga}
964 %files svga
965 %defattr(644,root,root,755)
966 %attr(755,root,root) %{_bindir}/smode2
967 %{_mandir}/man1/smode2.1*
968 %endif
969
970 %files libs
971 %defattr(644,root,root,755)
972 %attr(755,root,root) %{_libdir}/liblirc_client.so.*.*.*
973 %attr(755,root,root) %ghost %{_libdir}/liblirc_client.so.0
974
975 %files devel
976 %defattr(644,root,root,755)
977 %attr(755,root,root) %{_libdir}/liblirc_client.so
978 %{_libdir}/liblirc_client.la
979 %{_includedir}/lirc
980 %{_aclocaldir}/lirc.m4
981
982 %files static
983 %defattr(644,root,root,755)
984 %{_libdir}/liblirc_client.a
985 %endif
This page took 0.133981 seconds and 3 git commands to generate.