%kmdl lirc Summary: The Linux Infrared Remote Control (LIRC) package Name: lirc Version: 0.9.0 Release: 89%{?dist} License: GPL Group: System Environment/Daemons Source0: http://downloads.sourceforge.net/lirc/%{name}-%{version}.tar.bz2 Source1: lircd.init Source2: lircd.logrotate Source3: lircd.options Patch0: lirc-0.9.0-memdup.patch Patch1: lirc-0.9.0-lostdrivers.patch BuildRoot: %{_tmppath}/%{name}-root Requires(pre): /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 %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 .memdup %patch1 -p1 -b .lostdrivers %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 export CFLAGS="%{optflags} -D__KERNEL_STRICT_NAMES" %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 * Wed Mar 30 2011 Axel Thimm - 0.0.0-86 - Update to 0.9.0. * Wed Sep 9 2009 Axel Thimm - 0.8.6-85_cvs20090909 - Update to the latest cvs sources. * Tue Sep 1 2009 Axel Thimm - 0.8.6-84_cvs20090901 - Update to the latest cvs sources. * Sat Aug 29 2009 Axel Thimm - 0.8.5-82 - Update to 0.8.5. * Sat Nov 8 2008 Axel Thimm - 0.8.4a-81 - Update to 0.8.4a. * Thu May 29 2008 Axel Thimm - 0.8.4-77_cvs20080528 - Update to latest 0.8.4 cvs. * Tue May 27 2008 Axel Thimm - 0.8.4-76_cvs20080527 - Update to latest 0.8.4 cvs. * Fri Mar 14 2008 Axel Thimm - 0.8.3-74_cvs20080314 - Update to latest 0.8.3 cvs. * 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.