%bcond_with kernel24 %bcond_with rhel4hack %kmdl lirc Summary: The Linux Infrared Remote Control (LIRC) package Name: lirc Version: 0.8.3 Release: 73_cvs20071109%{?dist} License: GPL Group: System Environment/Daemons #Source0: http://downloads.sourceforge.net/lirc/%{name}-%{version}.tar.bz2 Source: %{name}-%{version}-20071109.tar.bz2 Source1: lircd.init Source2: lircd.logrotate Source3: lircd.options Patch0: lirc-0.8.3-rhkernel2.4.patch Patch1: lirc-0.8.1-rhel4hack.patch BuildRoot: %{_tmppath}/%{name}-root PreReq: /sbin/chkconfig, /sbin/service BuildRequires: gcc-c++ BuildRequires: perl, libtool, autoconf, automake, help2man %if %{with kernel24} BuildRequires: i2c-devel %endif BuildRequires: portaudio >= 18, libirman-devel BuildRequires: libXt-devel, libX11-devel, alsa-lib-devel %{!?_without_libusb:BuildRequires: libusb-devel} Requires: lirc-lib = %{eversion} #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. %package lib Summary: The liblirc_client runtime library Group: System Environment/Libraries %description lib LIRC is the Linux Infrared Remote Control package. This package features a clean lircd initscript and a logrotate config file. This package contains the runtime library liblirc_client for lirc. %package lib-devel Summary: Static libraries and header files for developing against liblirc_client Group: Development/Libraries Requires: lirc-lib = %{eversion} %description lib-devel LIRC is the Linux Infrared Remote Control package. This package features a clean lircd initscript and a logrotate config file. This package contains development files for building lirc clients. %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 grep -rl '#include ' . | xargs perl -pi -e's,#include ,/* #include */,' %patch0 -p1 -b .rhkernel2.4 %{?with_rhel4hack:%patch1 -p1} %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 #avermedia serial hauppauge it87 parallel mceusb mceusb2 sir tekram_bt829 cmdir igorplugusb imon sasem streamzap 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="$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}/dev touch %{buildroot}/etc/lircd.conf touch %{buildroot}/etc/lircmd.conf touch %{buildroot}/etc/irexec.conf %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 %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 lib -p /sbin/ldconfig %postun lib -p /sbin/ldconfig %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 %ghost %config(noreplace) /etc/lircd.conf %ghost %config(noreplace) /etc/lircmd.conf %ghost %config(noreplace) /etc/irexec.conf %{_bindir}/* %{_sbindir}/* %{_mandir}/man1/* %{_mandir}/man8/* %files lib %defattr(-,root,root,-) %{_libdir}/liblirc_*.so.* %files lib-devel %defattr(-,root,root,-) %{_includedir}/lirc %{_libdir}/liblirc_*.so %{_libdir}/liblirc_*.a %{_libdir}/liblirc_*.la %else %files -n %kmdl_name %defattr(-,root,root,-) %dir %{kmdl_moduledir}/drivers %{kmdl_moduledir}/drivers/lirc %endif %changelog * Fri Nov 9 2007 Axel Thimm - 0.8.3-73_cvs20071109 - Update to latest 0.8.3 cvs. * Mon Aug 27 2007 Axel Thimm - 0.8.3-70_cvs20070827 - Update to latest 0.8.3 cvs. * Mon Aug 6 2007 Axel Thimm - 0.8.3-69_cvs20070806 - Update to latest 0.8.3 cvs. * Thu Mar 1 2007 Axel Thimm - 0.8.2-66_cvs20070301 - Update to latest 0.8.2 cvs. * Thu Nov 30 2006 Axel Thimm - 0.8.1-65_cvs20061130 - Update to latest 0.8.1 cvs. * Sat Sep 30 2006 Axel Thimm - 0.8.1-62_cvs20060930 - Update to latest 0.8.1 cvs. * Wed Jun 28 2006 Axel Thimm - Update to latest 0.8.1 cvs. * Sat Mar 25 2006 Axel Thimm - Update to 0.8.1 cvs. - Add support for Soundgraph iMON (bug #736). - Add irexec support to lircd rc script (bug #670). * Sat Jan 21 2006 Axel Thimm - Update to 0.8.0 final. * Sat Jan 7 2006 Axel Thimm - Update to cvs 20060107. * Thu Jan 5 2006 Axel Thimm - Update to cvs 20060105. * Mon Nov 14 2005 Axel Thimm - Update to cvs 20051114. * Sun Nov 13 2005 Axel Thimm - Update to 0.8.0pre1. * Sun Oct 30 2005 Axel Thimm - Add cmdriver (bug #641) and igorplugusb devices (bug #653). * Sun Aug 14 2005 Axel Thimm - Update to 0.7.2. * Thu Apr 21 2005 Axel Thimm - Update to 0.7.1. * Sat Mar 5 2005 Axel Thimm - Increase MAX_IRCTL_DEVICES to 8 (Henrik Bentel ). * Thu Jan 13 2005 Tom Hughes - add sysconfig file to set lircd options. * Sat Jan 8 2005 Axel Thimm - enable serial transmit. - move devices to separate package and depend on it (for better udev handling). * Mon Nov 8 2004 Axel Thimm - Update to 0.7.0 final. * Mon Oct 11 2004 Axel Thimm - Update to 0.7.0pre8. * Sun Sep 12 2004 Axel Thimm - Reenable mceusb (reported by Jarod Wilson and Phil Bridges ). * Mon Jul 26 2004 Axel Thimm - Update to 0.7.0pre7. * Sun Jun 13 2004 Axel Thimm - Update to 0.7.0pre5. * Fri Apr 9 2004 Axel Thimm - Update to 0.7.0pre4. * Sun Feb 29 2004 Axel Thimm - Update to 0.7.0pre3. * Sun Feb 8 2004 Axel Thimm - Change userland driver back to any. * Mon Sep 22 2003 Axel Thimm - Remove dependency of lirc to %kmdl_namepure. Reported by Ludo Stellingwerff * Tue Sep 9 2003 Axel Thimm - Update to 0.7.0pre2. * Mon Jun 16 2003 Axel Thimm - Updated to 0.7.0 cvs 20030616. - Adapted for kernel module building. * Mon Mar 31 2003 Matthias Saou - Rebuilt for Red Hat Linux 9... this spec file needs some reworking! * Mon Oct 7 2002 Matthias Saou - Update to 0.6.6 final. * Mon Sep 16 2002 Matthias Saou - Updated to latest pre-version. - Kernel modules still need to be compiled separately and with a custom kernel :-( * Thu May 2 2002 Matthias Saou - Update to 0.6.5. - Rebuilt against Red Hat Linux 7.3. - Added the %%{?_smp_mflags} expansion. * Thu Oct 4 2001 Matthias Saou - Initial RPM release.