Search
j0ke.net Open Build Service
>
Projects
>
multimedia
:
EL6
>
lirc
> lirc.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File lirc.spec of Package lirc (Revision 2)
Currently displaying revision
2
,
show latest
%kmdl lirc Summary: The Linux Infrared Remote Control (LIRC) package Name: lirc Version: 0.8.7 Release: 88%{?dist} License: GPL Group: System Environment/Daemons Source0: http://downloads.sourceforge.net/lirc/%{name}-%{version}.tar.bz2 #Source: %{name}-%{version}-20090901.tar.bz2 Source1: lircd.init Source2: lircd.logrotate Source3: lircd.options Patch0: lirc-0.8.3-rhkernel2.4.patch Patch1: lirc-0.8.3-rhel4hack.patch BuildRoot: %{_tmppath}/%{name}-root PreReq: /sbin/chkconfig, /sbin/service BuildRequires: gcc-c++ BuildRequires: perl, libtool, autoconf, automake, help2man BuildRequires: portaudio >= 18, libirman-devel BuildRequires: libXt-devel, libX11-devel, alsa-lib-devel BuildRequires: libusb-devel BuildRequires: python BuildRequires: libftdi-devel BuildRequires: kernel-devel %lib_dependencies Obsoletes: lirc-lib < %{evr}, lirc-libs < %{evr} Provides: lirc-lib = %{evr}, lirc-libs = %{evr} Conflicts: lirc-lib > %{evr}, lirc-libs > %{evr} #Requires: libirman %description LIRC is the Linux Infrared Remote Control package. This package features a clean lircd initscript and a logrotate config file. The default binary build of this package will try to install most available kernel drivers. %lib_package lirc_client 0 %devel_extra_Obsoletes lirc-lib-devel < %{evr} %devel_extra_Provides lirc-lib-devel = %{evr} %package -n %kmdl_name %kmdl_dependencies Summary: The Linux Infrared Remote Control (LIRC) kernel drivers Group: System Environment/Kernel Requires: lirc-devices %description -n %kmdl_name LIRC is the Linux Infrared Remote Control package. %kmdl_desc %prep %setup -q %patch0 -p1 -b .rhkernel2.4 %patch1 -p1 -b .rhel4hack %if ! %{kmdl_userland} if [ -d %{kmdl_kernelsrcdir}/drivers/media/video/bt8xx/ ]; then perl -pi -e's,../drivers/media/video/bttv,../drivers/media/video/bt8xx/bttv,' drivers/lirc_gpio/lirc_gpio.c perl -pi -e's,LIRC_EXTRA_CFLAGS = ,LIRC_EXTRA_CFLAGS = -I%{kmdl_kernelsrcdir}/drivers/media/video ,' drivers/Makefile.common fi %endif cat >> KMDL_DRIVERS << EOF atiusb bt829 ene0100 #gpio i2c igorplugusb ttusbir #imon it87 ite8709 mceusb parallel sasem serial sir streamzap wpc8769l EOF %build autoreconf -f -i %kmdl_config mkdir fake_mknod PATH=`pwd`/fake_mknod:$PATH cat > fake_mknod/mknod << "EOF" #! /bin/sh echo WARNING mknod called with echo mknod "$@" EOF chmod +x fake_mknod/mknod %if %{kmdl_userland} libtoolize -f %configure \ --with-x=yes \ --x-includes=%{_x_includes} --x-libraries=%{_x_libraries} \ --with-syslog \ --with-transmitter \ --with-driver=userspace make %else mkdir buildroot for driver in `cat KMDL_DRIVERS | grep -v \#`; do # parallel is not smp safe test $driver = parallel && grep '^CONFIG_SMP=y' %{kmdl_kernelsrcdir}/.config > /dev/null && continue # mceusb2 needs a 2.6 kernel # imon and sasem need kernel >= 2.4.22 test $driver = mceusb2 -o $driver = imon -o $driver = sasem \ && grep 'PATCHLEVEL = 4' %{kmdl_kernelsrcdir}/Makefile > /dev/null && continue mkdir buildroot/"$driver" %configure \ --with-kerneldir=%{kmdl_kernelsrcdir} \ --with-moduledir=%{kmdl_moduledir}/drivers/lirc \ --with-x \ --x-includes=%{_x_includes} --x-libraries=%{_x_libraries} \ --with-syslog \ --with-transmitter \ --with-driver="lirc_dev lirc_$driver" make -C drivers CC="%{_kernelcompiler} -I%{_includedir}/i2c" make -C drivers install DESTDIR=`pwd`/buildroot/"$driver" done %endif %install rm -rf %{buildroot} PATH=`pwd`/fake_mknod:$PATH %if %{kmdl_userland} make install DESTDIR=%{buildroot} install -m 755 -D %{SOURCE1} %{buildroot}/etc/init.d/lircd install -m 644 -D %{SOURCE2} %{buildroot}/etc/logrotate.d/lircd install -m 644 -D %{SOURCE3} %{buildroot}/etc/sysconfig/lircd perl -pi -e 's|\@SBINDIR\@|%{_sbindir}|g' %{buildroot}/etc/init.d/lircd rm -f doc/Makefile* mkdir -p %{buildroot}/etc/lirc touch %{buildroot}/etc/lirc/lircd.conf touch %{buildroot}/etc/lirc/lircmd.conf touch %{buildroot}/etc/lirc/lircrc %else mkdir -p %{buildroot}%{kmdl_moduledir}/drivers/lirc for driver in `cat KMDL_DRIVERS`; do install -p buildroot/"$driver"%{kmdl_moduledir}/drivers/lirc/* \ %{buildroot}%{kmdl_moduledir}/drivers/lirc/ || : done %endif %post /sbin/chkconfig --add lircd for file in lircd.conf lircmd.conf lircrc; do if test -e /etc/lirc/$file; then continue; fi if test -e /etc/$file; then mv /etc/$file /etc/lirc/$file fi done %preun if [ $1 = 0 ]; then /sbin/service lircd stop > /dev/null 2>&1 || : /sbin/chkconfig --del lircd fi %postun if [ "$1" -ge "1" ]; then /sbin/service lircd condrestart >/dev/null 2>&1 || : fi %post -n %kmdl_name %kmdl_install %postun -n %kmdl_name %kmdl_remove %clean rm -rf %{buildroot} %if %{kmdl_userland} %files %defattr(-,root,root,-) %doc ANNOUNCE AUTHORS ChangeLog COPYING NEWS README TODO doc remotes %doc contrib/*.conf contrib/irman2lirc contrib/lircrc contrib/lircs /etc/init.d/lircd /etc/logrotate.d/lircd %config(noreplace) /etc/sysconfig/lircd %dir /etc/lirc %ghost %config(noreplace) /etc/lirc/lircd.conf %ghost %config(noreplace) /etc/lirc/lircmd.conf %ghost %config(noreplace) /etc/lirc/lircrc %dir /var/run/lirc %{_bindir}/* %{_sbindir}/* %{_mandir}/man1/* %{_mandir}/man8/* %else %files -n %kmdl_name %defattr(-,root,root,-) %dir %{kmdl_moduledir}/drivers %{kmdl_moduledir}/drivers/lirc %endif %changelog