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