tomh / rpms / lirc

Forked from rpms/lirc 6 years ago
Clone
58b3320
# TODO:
58b3320
# - caraca driver (req: caraca, http://caraca.sf.net/)
58b3320
# - irman driver (req: libirman, http://lirc.sf.net/software/snapshots/)
285123d
# - iguanaIR driver (req: http://iguanaworks.net/ir/usb/installation.shtml)
6117573
#   -> would cause license change to "GPLv2"
b830d9a
# - move to -devel (?): irw, *mode2, others?
1041431
#   note: xmode2 inflicts a dependency on X, and smode2 on svgalib
b0fc0d5
#   - does someone actually need xmode2/smode2 for something?
e6acbb5
# - split utils into subpackage (keep daemons in main package)
b830d9a
# - don't run as root and/or create dedicated group, reduce fifo permissions?
b830d9a
# - Fixup /etc/lirc(m)d.conf %%ghost'ification, existence after erase etc.
b830d9a
15c053a
%bcond_without  alsa
15c053a
%bcond_with     portaudio
15c053a
%bcond_with     svgalib
15c053a
%bcond_without  x
075a078
%define pre     pre3
15c053a
b830d9a
Name:           lirc
1cf3fcf
Version:        0.8.3
075a078
Release:        0.4%{?pre:.%{pre}}%{?dist}
b830d9a
Summary:        The Linux Infrared Remote Control package
b830d9a
b830d9a
Group:          System Environment/Daemons
6117573
License:        GPLv2+
b830d9a
URL:            http://www.lirc.org/
1cf3fcf
#Source0:        http://downloads.sourceforge.net/lirc/%{name}-%{version}.tar.bz2
1cf3fcf
Source0:        http://lirc.sourceforge.net/software/snapshots/%{name}-%{version}%{pre}.tar.bz2
b830d9a
Source1:        %{name}.init
b830d9a
Source2:        %{name}.sysconfig
b830d9a
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
b830d9a
1041431
BuildRequires:  %{__perl}
1041431
BuildRequires:  libusb-devel
15c053a
%if %{with alsa}
15c053a
BuildRequires:  alsa-lib-devel
15c053a
%endif
15c053a
%if %{with portaudio}
1041431
BuildRequires:  portaudio-devel >= 18
15c053a
%endif
15c053a
%if %{with svgalib}
15c053a
BuildRequires:  svgalib-devel
15c053a
%endif
15c053a
%if %{with x}
15c053a
BuildRequires:  libXt-devel
15c053a
%endif
e6acbb5
Requires:       %{name}-libs = %{version}-%{release}
1041431
Requires(post): /sbin/chkconfig
1041431
Requires(post): /sbin/ldconfig
b830d9a
Requires(preun): /sbin/chkconfig
b830d9a
Requires(postun): /sbin/ldconfig
cvsextras 3b7cb6d
cvsextras 3b7cb6d
%description
1041431
LIRC is a package that allows you to decode and send infra-red and
1041431
other signals of many (but not all) commonly used remote controls.
1041431
Included applications include daemons which decode the received
1041431
signals as well as user space applications which allow controlling a
1041431
computer with a remote control.
cvsextras 3b7cb6d
e6acbb5
%package        libs
e6acbb5
Summary:        LIRC libraries
e6acbb5
Group:          System Environment/Libraries
e6acbb5
e6acbb5
%description    libs
e6acbb5
LIRC is a package that allows you to decode and send infra-red and
e6acbb5
other signals of many (but not all) commonly used remote controls.
e6acbb5
Included applications include daemons which decode the received
e6acbb5
signals as well as user space applications which allow controlling a
e6acbb5
computer with a remote control.  This package includes shared libraries
e6acbb5
that applications use to interface with LIRC.
e6acbb5
b830d9a
%package        devel
b830d9a
Summary:        Development files for LIRC
b830d9a
Group:          Development/Libraries
e6acbb5
Requires:       %{name}-libs = %{version}-%{release}
b830d9a
b830d9a
%description    devel
15c053a
LIRC is a package that allows you to decode and send infra-red and
15c053a
other signals of many (but not all) commonly used remote controls.
15c053a
Included applications include daemons which decode the received
15c053a
signals as well as user space applications which allow controlling a
15c053a
computer with a remote control.  This package includes files for
15c053a
developing applications that use LIRC.
15c053a
15c053a
%package        doc
15c053a
Summary:        LIRC documentation
15c053a
Group:          Documentation
15c053a
15c053a
%description    doc
15c053a
LIRC is a package that allows you to decode and send infra-red and
15c053a
other signals of many (but not all) commonly used remote controls.
15c053a
Included applications include daemons which decode the received
15c053a
signals as well as user space applications which allow controlling a
15c053a
computer with a remote control.  This package contains LIRC
15c053a
documentation and a collection of remote control configuration files.
b830d9a
cvsextras 3b7cb6d
cvsextras 3b7cb6d
%prep
1cf3fcf
%setup -q -n %{name}-%{version}%{?pre}
e6acbb5
b830d9a
chmod 644 contrib/*
e6acbb5
15c053a
sed -i -e 's|/usr/local/etc/|/etc/|' contrib/irman2lirc
e6acbb5
cd4f796
sed -i -e 's/\r//' remotes/hercules/lircd.conf.smarttv_stereo \
cd4f796
    remotes/adstech/lircd.conf.usbx-707
e6acbb5
15c053a
sed -i -e 's|/sbin/init.d/lircd|%{_initrddir}/lirc|' contrib/lircs
e6acbb5
285123d
for f in remotes/chronos/lircd.conf.chronos \
cd4f796
    remotes/creative/lircd.conf.livedrive remotes/atiusb/lircd.conf.atiusb \
cd4f796
    NEWS ChangeLog AUTHORS contrib/lircrc ; do
285123d
    iconv -f iso-8859-1 -t utf-8 $f > $f.utf8 ; mv $f.utf8 $f
285123d
done
e6acbb5
285123d
sed -i -e 's|"/lib /usr/lib |"/%{_lib} %{_libdir} |' configure # lib64 rpath
e6acbb5
15c053a
# *cough* I wish there was a good way to disable alsa/portaudio/svgalib...
15c053a
%if ! %{with alsa}
15c053a
sed -i -e 's/asoundlib.h/ALSA_DISABLED/g' configure*
15c053a
%endif
15c053a
%if ! %{with portaudio}
15c053a
sed -i -e 's/portaudio.h/PORTAUDIO_DISABLED/g' configure*
15c053a
%endif
15c053a
%if ! %{with svgalib}
15c053a
sed -i -e 's/vga.h/SVGALIB_DISABLED/g' configure*
15c053a
%endif
e6acbb5
4ffbb7a
touch -r aclocal.m4 configure.ac # avoid autofoo re-run
cvsextras 3b7cb6d
cvsextras 3b7cb6d
cvsextras 3b7cb6d
%build
cvsextras 3b7cb6d
%configure \
1041431
  --disable-static \
b830d9a
  --disable-dependency-tracking \
1041431
  --enable-sandboxed \
15c053a
%if ! %{with x}
15c053a
  --without-x \
15c053a
%endif
1041431
  --with-syslog=LOG_DAEMON \
b0fc0d5
  --with-driver=userspace
b0fc0d5
make %{?_smp_mflags}
cvsextras 3b7cb6d
cvsextras 3b7cb6d
cvsextras 3b7cb6d
%install
b830d9a
rm -rf $RPM_BUILD_ROOT __docs
b830d9a
b830d9a
make install DESTDIR=$RPM_BUILD_ROOT
15c053a
install -pm 755 contrib/irman2lirc $RPM_BUILD_ROOT%{_bindir}
15c053a
%if ! %{with svgalib}
15c053a
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/smode2.1*
15c053a
%endif
15c053a
%if ! %{with x}
15c053a
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/irxevent.1*
15c053a
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/xmode2.1*
15c053a
%endif
58b3320
3c80c36
install -Dpm 644 doc/lirc.hwdb $RPM_BUILD_ROOT%{_datadir}/lirc/lirc.hwdb
3c80c36
b830d9a
install -Dpm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/lirc
b830d9a
%{__perl} -pi -e \
b830d9a
  's|/etc/|%{_sysconfdir}/|g ;
b830d9a
   s|/var/|%{_localstatedir}/|g ;
b830d9a
   s|/usr/sbin/|%{_sbindir}/|g' \
b830d9a
  $RPM_BUILD_ROOT%{_initrddir}/lirc
b830d9a
install -Dpm 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/lirc
58b3320
b830d9a
mkdir __docs
b830d9a
cp -pR doc contrib __docs
b830d9a
cd __docs
3c80c36
rm -rf doc/Makefile* doc/.libs doc/man* doc/lirc.hwdb
15c053a
rm -rf contrib/irman2lirc contrib/lirc.* contrib/sendxevent.c
b830d9a
cd ..
58b3320
b830d9a
touch $RPM_BUILD_ROOT%{_sysconfdir}/lirc{d,md}.conf
58b3320
b830d9a
install -dm 755 $RPM_BUILD_ROOT/dev
b830d9a
touch $RPM_BUILD_ROOT/dev/lirc{d,m}
58b3320
1041431
rm $RPM_BUILD_ROOT%{_libdir}/liblirc_client.la
b830d9a
b830d9a
b830d9a
%clean
b830d9a
rm -rf $RPM_BUILD_ROOT
b830d9a
cvsextras 3b7cb6d
cvsextras 3b7cb6d
%post
b830d9a
/sbin/chkconfig --add lirc
b830d9a
e6acbb5
%post libs -p /sbin/ldconfig
e6acbb5
cvsextras 3b7cb6d
%preun
b830d9a
if [ $1 -eq 0 ] ; then
b830d9a
  %{_initrddir}/lirc stop >/dev/null || :
b830d9a
  /sbin/chkconfig --del lirc || :
cvsextras 3b7cb6d
fi
cvsextras 3b7cb6d
cvsextras 3b7cb6d
%postun
b830d9a
if [ $1 -gt 0 ] ; then
b830d9a
  %{_initrddir}/lirc try-restart >/dev/null || :
cvsextras 3b7cb6d
fi
cvsextras 3b7cb6d
e6acbb5
%postun libs -p /sbin/ldconfig
e6acbb5
b830d9a
cvsextras 3b7cb6d
%files
b830d9a
%defattr(-,root,root,-)
15c053a
%doc ANNOUNCE AUTHORS ChangeLog COPYING NEWS README TODO
b830d9a
%ghost %config(noreplace) %{_sysconfdir}/lirc*d.conf
b830d9a
%config(noreplace) %{_sysconfdir}/sysconfig/lirc
1041431
%{_initrddir}/lirc
b0fc0d5
%{_bindir}/*ir*
b830d9a
%{_bindir}/*mode2
b830d9a
%{_sbindir}/lirc*d
3c80c36
%{_datadir}/lirc/
274244a
%{_mandir}/man1/*ir*.1*
b830d9a
%{_mandir}/man1/*mode2*.1*
b830d9a
%{_mandir}/man8/lirc*d.8*
b830d9a
%ghost /dev/lirc*
b830d9a
e6acbb5
%files libs
e6acbb5
%defattr(-,root,root,-)
e6acbb5
%{_libdir}/liblirc_client.so.*
e6acbb5
b830d9a
%files devel
b830d9a
%defattr(-,root,root,-)
1041431
%{_includedir}/lirc/
b830d9a
%{_libdir}/liblirc_client.so
b830d9a
15c053a
%files doc
15c053a
%defattr(-,root,root,-)
15c053a
%doc __docs/* remotes/
15c053a
b830d9a
cvsextras 3b7cb6d
%changelog
075a078
* Sun Apr 27 2008 Jarod Wilson <jwilson@redhat.com> - 0.8.3-0.4.pre3
075a078
- Update to 0.8.3pre3
075a078
4ffbb7a
* Sun Apr 06 2008 Jarod Wilson <jwilson@redhat.com> - 0.8.3-0.3.pre2
4ffbb7a
- Update to 0.8.3pre2
4ffbb7a
e6acbb5
* Tue Feb 12 2008 Ville Skyttä <ville.skytta at iki.fi> - 0.8.3-0.2.pre1
e6acbb5
- Split libraries into -libs subpackage.
e6acbb5
- Refresh autotools re-run avoidance hack.
e6acbb5
1cf3fcf
* Thu Oct 18 2007 Jarod Wilson <jwilson@redhat.com> - 0.8.3-0.1.pre1
1cf3fcf
- 0.8.3pre1
1cf3fcf
- adds Mac IR support, resolves bz #284291
1cf3fcf
6117573
* Wed Aug 15 2007 Ville Skyttä <ville.skytta at iki.fi> - 0.8.2-2
6117573
- License: GPLv2+
6117573
3c80c36
* Sun Jun 10 2007 Ville Skyttä <ville.skytta at iki.fi> - 0.8.2-1
3c80c36
- 0.8.2.
3c80c36
cd4f796
* Wed Jun  6 2007 Ville Skyttä <ville.skytta at iki.fi> - 0.8.2-0.1.pre3
cd4f796
- 0.8.2pre3.
cd4f796
- Fix up linefeeds and char encodings of more docs.
cd4f796
71d0dcc
* Fri May 18 2007 Ville Skyttä <ville.skytta at iki.fi> - 0.8.2-0.1.pre2
71d0dcc
- 0.8.2pre2.
71d0dcc
3453c0d
* Sun Jan  7 2007 Ville Skyttä <ville.skytta at iki.fi> - 0.8.1-1
3453c0d
- 0.8.1.
3453c0d
203f335
* Sat Dec 30 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.8.1-0.2.pre5
203f335
- 0.8.1pre5.
203f335
a42399d
* Tue Dec 12 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.8.1-0.2.pre4
a42399d
- 0.8.1pre4.
a42399d
cc59c06
* Thu Nov 30 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.8.1-0.2.pre3
cc59c06
- 0.8.1pre3.
cc59c06
285123d
* Sun Oct 15 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.8.1-0.2.pre2
285123d
- 0.8.1pre2, optflags patch no longer needed.
285123d
b617657
* Mon Aug 28 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.8.1-0.2.pre1
b617657
- Rebuild.
b617657
15c053a
* Sat Jul  1 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.8.1-0.1.pre1
15c053a
- 0.8.1pre1.
15c053a
- Add rpmbuild options for enabling/disabling ALSA, portaudio and/or X
15c053a
  support, ALSA and X enabled by default, portaudio not.
15c053a
- Split most of the documentation to -doc subpackage.
15c053a
- Install irman2lirc as non-doc.
15c053a
c3a0c1a
* Tue Feb 14 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.8.0-3
c3a0c1a
- Avoid standard rpaths on lib64 archs.
c3a0c1a
c4d0fb1
* Sat Jan 21 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.8.0-2
c4d0fb1
- 0.8.0.
c4d0fb1
e9e569c
* Sat Jan 14 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.8.0-0.2.pre4
e9e569c
- 0.8.0pre4.
e9e569c
1344e66
* Sun Jan  1 2006 Ville Skyttä <ville.skytta at iki.fi> - 0.8.0-0.2.pre3
1344e66
- 0.8.0pre3.
1344e66
58b3320
* Tue Dec 27 2005 Ville Skyttä <ville.skytta at iki.fi>
58b3320
- Split kernel modules into separate package.
58b3320
- Disable debugging features.
58b3320
274244a
* Wed Dec 14 2005 Ville Skyttä <ville.skytta at iki.fi> - 0.8.0-0.2.pre2
274244a
- 0.8.0pre2, kernel >= 2.6.15 USB patch applied upstream.
274244a
- lirc_clientd renamed to lircrcd.
274244a
b0fc0d5
* Tue Nov 29 2005 Ville Skyttä <ville.skytta at iki.fi> - 0.8.0-0.2.pre1
b0fc0d5
- Pull security fix for the new lirc_clientd from upstream CVS, and
b0fc0d5
  while at it, some other useful post-0.8.0pre1 changes.
b0fc0d5
- Kernel >= 2.6.15 patchwork based on initial patch from Andy Burns (#172404).
b0fc0d5
- Disable lirc_cmdir kernel module (unknown symbols).
b0fc0d5
- Adapt to modular X.Org packaging.
b0fc0d5
b0fc0d5
* Wed Nov  9 2005 Ville Skyttä <ville.skytta at iki.fi> - 0.8.0-0.1.pre1
b0fc0d5
- 0.8.0pre1, usage message patch applied upstream.
b0fc0d5
b0fc0d5
* Sun Oct 30 2005 Ville Skyttä <ville.skytta at iki.fi> - 0.7.3-0.1.pre1
b0fc0d5
- 0.7.3pre1, "no device" crash fix applied upstream.
b0fc0d5
- Fix lircd and lircmd usage messages.
b0fc0d5
9956455
* Wed Aug 31 2005 Ville Skyttä <ville.skytta at iki.fi> - 0.7.2-3
9956455
- Make the init script startup earlier and shutdown later by default.
9956455
1041431
* Sun Aug 14 2005 Ville Skyttä <ville.skytta at iki.fi> - 0.7.2-2
1041431
- 0.7.2, patch to fix crash at startup when no device is specified.
1041431
- Enable audio input driver support (portaudio).
1041431
- Improve package description.
1041431
- Don't ship static libraries.
1041431
- Drop pre Fedora Extras backwards compatibility hacks.
1041431
- Make svgalib support (smode2) build conditional, disabled by default.
1041431
- Simplify module package build (still work in progress, disabled by default).
1041431
- Other minor specfile cleanups and maintainability improvements.
1041431
5580f84
* Thu May 26 2005 Ville Skyttä <ville.skytta at iki.fi> - 0.7.1-3
5580f84
- Adjust kernel module build for FC4 and add hauppauge, igorplugusb, imon,
5580f84
  sasem, and streamzap to the list of modules to build.  This stuff is still
5580f84
  disabled by default, rebuild with "--with modules --target $arch" to enable.
5580f84
c88c456
* Sun Apr 17 2005 Ville Skyttä <ville.skytta at iki.fi> - 0.7.1-2
c88c456
- 0.7.1.
c88c456
610580f
* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
610580f
- rebuilt
610580f
b830d9a
* Sun Dec  5 2004 Ville Skyttä <ville.skytta at iki.fi> - 0.7.0-1
b830d9a
- Update to 0.7.0; major rework of the package:
b830d9a
- Change default driver to "any".
b830d9a
- Add -devel subpackage.
b830d9a
- Improve init script, add %%{_sysconfdir}/sysconfig/lirc for options.
b830d9a
- Rename init script to "lirc" to follow upstream; the script is not only
b830d9a
  for lircd, but lircmd as well.
b830d9a
- Log to syslog instead of separate log file.
b830d9a
- %%ghost'ify /dev/lirc*.
b830d9a
- Build kernel modules when rebuilt with "--with kmod".  This stuff was mostly
b830d9a
  borrowed from Axel Thimm's packages, and is not really ready for FC3+ yet.
b830d9a
- Enable debugging features.
b830d9a
- Specfile cleanups.
b830d9a
cvsextras 3b7cb6d
* Mon Aug 30 2004 Matthias Saou <http://freshrpms.net/> 0.6.6-3
cvsextras 3b7cb6d
- Added missing /sbin/ldconfig calls.
cvsextras 3b7cb6d
cvsextras 3b7cb6d
* Wed May 19 2004 Matthias Saou <http://freshrpms.net/> 0.6.6-2
cvsextras 3b7cb6d
- Rebuild for Fedora Core 2... this spec file still _really_ needs reworking!
cvsextras 3b7cb6d
cvsextras 3b7cb6d
* Fri Nov  7 2003 Matthias Saou <http://freshrpms.net/> 0.6.6-2
cvsextras 3b7cb6d
- Rebuild for Fedora Core 1... this spec file _really_ needs reworking!
cvsextras 3b7cb6d
cvsextras 3b7cb6d
* Mon Mar 31 2003 Matthias Saou <http://freshrpms.net/>
cvsextras 3b7cb6d
- Rebuilt for Red Hat Linux 9... this spec file needs some reworking!
cvsextras 3b7cb6d
cvsextras 3b7cb6d
* Mon Oct  7 2002 Matthias Saou <http://freshrpms.net/>
cvsextras 3b7cb6d
- Update to 0.6.6 final.
cvsextras 3b7cb6d
cvsextras 3b7cb6d
* Mon Sep 16 2002 Matthias Saou <http://freshrpms.net/>
cvsextras 3b7cb6d
- Updated to latest pre-version.
cvsextras 3b7cb6d
- Kernel modules still need to be compiled separately and with a custom
cvsextras 3b7cb6d
  kernel :-(
cvsextras 3b7cb6d
cvsextras 3b7cb6d
* Thu May  2 2002 Matthias Saou <http://freshrpms.net/>
cvsextras 3b7cb6d
- Update to 0.6.5.
cvsextras 3b7cb6d
- Rebuilt against Red Hat Linux 7.3.
cvsextras 3b7cb6d
- Added the %%{?_smp_mflags} expansion.
cvsextras 3b7cb6d
cvsextras 3b7cb6d
* Thu Oct  4 2001 Matthias Saou <http://freshrpms.net/>
cvsextras 3b7cb6d
- Initial RPM release.
cvsextras 3b7cb6d