%kmdl lirc # The driver(s) you want to compile in, e.g. "pctv", "serial", "any" # Whitespace separated list of cards for which to compile a driver %define drivers atiusb avermedia avermedia98 com1 flyvideo hauppauge it87 lpt1 mceusb mceusb2 sir_com3 tekram_bt829 udp cmdir igorplugusb imon imon_pad imon_rsc Summary: The Linux Infrared Remote Control (LIRC) package. Name: lirc Version: 0.8.1pre1 Release: %atrelease cvs20060603_58 License: GPL Group: System Environment/Daemons Source0: http://prdownloads.sourceforge.net/lirc/%{name}-%{version}.tar.bz2 #Source0: %{name}-%{version}-20060325.tar.bz2 Source1: lircd.init Source2: lircd.logrotate Source3: lircd.options Patch0: lirc-0.8.0-rhkernel2.4.patch Patch1: bttv.patch BuildRoot: %{_tmppath}/%{name}-root PreReq: /sbin/chkconfig, /sbin/service BuildRequires: gcc-c++ BuildRequires: perl, libtool, autoconf, automake, help2man BuildRequires: i2c-kernheaders 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 %patch0 -p1 %patch1 -p1 if [ -d %{_includedir}/i2c ]; then ln -s %{_includedir}/i2c/linux mylinux grep -rl linux/i2c . | xargs perl -pi -e's,linux/i2c,mylinux/i2c,g' fi %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 %{drivers}; do # lpt1 is not smp safe test $driver = lpt1 && grep '^CONFIG_SMP=y' %{kmdl_kernelsrcdir}/.config > /dev/null && continue # mceusb2 needs a 2.6 kernel test $driver = mceusb2 && 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 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 %{drivers}; do # lpt1 is not smp safe #mkdir -p %{buildroot}%{kmdl_moduledir}/drivers/lirc/lirc-"$driver" if [ $driver = lpt1 -a "%{kflavour}" != "" ]; then continue; fi # install -p buildroot/"$driver"%{kmdl_moduledir}/drivers/lirc/* \ # %{buildroot}%{kmdl_moduledir}/drivers/lirc/lirc-"$driver"/ || : 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,-) %{kmdl_moduledir}/drivers/lirc %endif %changelog * 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.