lirc/lirc.spec

244 lines
7.6 KiB
RPMSpec

# DISTCC disabled by default for this package
%define USE_DISTCC 0
%define kernel_majversion %(echo %KERNEL_VER | cut -d. -f1-2)
%define kernel_version %(echo %KERNEL_VER | cut -d. -f1-3)
%define BUILD_CC %{_target_platform}-gcc
%define BUILD_CXX %{_target_platform}-g++
%if %{USE_DISTCC}
%define DISTCC_CC ccache distcc %{?BUILD_CC}
%define DISTCC_CXX ccache distcc %{?BUILD_CXX}
%define BUILD_OPTS CC="%{DISTCC_CC}" CXX="%{DISTCC_CXX}" -j12
%else
%define BUILD_OPTS CC="%{BUILD_CC}" CXX="%{BUILD_CXX}" %{_smp_mflags}
%endif
%if "%{?KERNEL_TARGET}" == ""
# build a mamba kernel by default
%define KERNEL_TARGET mamba
%else
%define KERNEL_TARGET_APPEND -%{KERNEL_TARGET}
%endif
%if "%{?KERNEL_VER}" == ""
%define KERNEL_VER %(uname -r | sed "s|\\([0-9.]*\\).*|\\1|" )
%endif
Name: lirc
Version: 0.9.1a
Epoch: 1
Release: 1mamba
Summary: A package that allows you to decode and send infra-red signals
Group: System/Hardware
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.lirc.org/
Source: https://downloads.sourceforge.net/project/lirc/LIRC/%{version}/lirc-%{version}.tar.bz2
Patch0: %{name}-0.8.5-parallel_forcesmp.patch
Patch1: %{name}-0.8.2-macmini.patch
Patch2: kernel-2.6.23-lirc_bttv.patch
Patch3: %{name}-0.8.3pre1-disable_portaudio.patch
Patch4: %{name}-0.8.6-kernel-2.6.33.patch
Patch5: %{name}-0.8.6-i2c.patch
Patch6: %{name}-0.9.0-kernel-2.6.39.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libICE-devel
BuildRequires: libpthread-stubs-devel
BuildRequires: libSM-devel
BuildRequires: libuuid-devel
BuildRequires: libX11-devel
BuildRequires: libXau-devel
BuildRequires: libxcb-devel
BuildRequires: libXdmcp-devel
## AUTOBUILDREQ-END
BuildRequires: help2man >= 1.36.3
#BuildRequires: kernel-%{KERNEL_TARGET}-headers >= %{kernel_version}
#BuildRequires: kernel-%{KERNEL_TARGET}-headers <= %{kernel_version}.255
#Requires: kernellirc
## FIXME: lirc has portaudio v.18 support but system has 19, patch needed
#BuildConflicts: libportaudio-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
LIRC is a package that allows you to decode and send infra-red signals of many (but not all) commonly used remote controls.
%package devel
Summary: Devel package for %{name}
Group: Development/Libraries
Requires: %{name} = %{?epoch:%epoch:}%{version}
%description devel
LIRC is a package that allows you to decode and send infra-red signals of many (but not all) commonly used remote controls.
This package contains static libraries and header files need for development.
%package -n kernel-%{KERNEL_TARGET}-lirc
Summary: Lirc remote control drivers for the %{kernel_ver}%{KERNEL_TARGET} kernel
Group: System/Kernel and Hardware/Drivers
Requires(pre): kernel-%{KERNEL_TARGET} >= %{kernel_version}
Requires(pre): kernel-%{KERNEL_TARGET} <= %{kernel_version}.255
Requires: module-init-tools
Provides: kernellirc
## KERNELOBSOLETES-BEGIN 3.4
Obsoletes: kernel-%{KERNEL_TARGET}-lirc = 1:0.9.0-8mamba
## KERNELOBSOLETES-END
%description -n kernel-%{KERNEL_TARGET}-lirc
Lirc remote control drivers for the %{kernel_ver}%{KERNEL_TARGET} kernel.
%prep
%setup -q
#%patch0 -p1
#%patch1 -p1
#%patch2 -p1
#%patch3 -p1
#%patch4 -p0
#%patch5 -p0
%patch6 -p1
%build
%configure \
--with-driver=none
# --with-driver=all
# --with-kerneldir=/usr/src/linux-%{KERNEL_VER}%{KERNEL_TARGET} \
# --with-moduledir=/lib/modules/%{KERNEL_VER}%{KERNEL_TARGET}/misc
%make systemddir=%{_unitdir}
#make -C drivers %{BUILD_OPTS} -j1
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
sed -i "s|/bin/mknod|/bin/true|" drivers/Makefile drivers/*/Makefile
sed -i "s|/sbin/depmod|/bin/true|" drivers/Makefile drivers/*/Makefile
install -d %{buildroot}%{_sysconfdir}/lirc
cp -a remotes/* %{buildroot}%{_sysconfdir}/lirc
%makeinstall systemddir=%{_unitdir}
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%post
if [ $1 -ge 1 ]; then
systemctl -q daemon-reload
fi
:
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/lirc
%{_sysconfdir}/lirc/*
%{_bindir}/*
%{_unitdir}/lircd.service
%{_unitdir}/lircd.socket
%{_unitdir}/lircmd.service
%{_libdir}/liblirc_client.so.*
%{_sbindir}/lircd
%{_sbindir}/lircmd
%{_mandir}/man1/ircat.1.gz
%{_mandir}/man1/irexec.1.gz
%{_mandir}/man1/irpty.1.gz
%{_mandir}/man1/irrecord.1.gz
%{_mandir}/man1/irsend.1.gz
%{_mandir}/man1/irw.1.gz
%{_mandir}/man1/irxevent.1.gz
%{_mandir}/man1/lircrcd.1.gz
%{_mandir}/man1/mode2.1.gz
%{_mandir}/man1/smode2.1.gz
%{_mandir}/man1/xmode2.1.gz
%{_mandir}/man8/lircd.8.gz
%{_mandir}/man8/lircmd.8.gz
/var/run/lirc/lircd
/var/run/lirc/lircm
%doc AUTHORS COPYING
%doc ChangeLog NEWS README TODO
%files devel
%defattr(-,root,root)
%{_libdir}/liblirc_client.la
%{_libdir}/liblirc_client.so
%dir %{_includedir}/lirc
%{_includedir}/lirc/*.h
%dir %{_docdir}/lirc
%{_docdir}/lirc/*
#%files -n kernel-%{KERNEL_TARGET}-lirc
#%defattr(-,root,root)
#/lib/modules/%{KERNEL_VER}%{KERNEL_TARGET}/misc/lirc_*.ko
%changelog
* Sun Aug 31 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.1a-1mamba
- update to 0.9.1a
* Thu Jun 12 2014 Automatic Build System <autodist@mambasoft.it> 0.9.1-1mamba
- automatic update by autodist
* Fri Jan 04 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0-9mamba
- kernel 3.4 rebuild
* Sat Oct 27 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0-8mamba
- kernel 3.6 rebuild
* Sat Jun 30 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0-7mamba
- automatic update by autodist
* Wed Feb 29 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0-6mamba
- rebuilt without kernel modules package (mostly provided in recent kernels)
* Sun Feb 12 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0-5mamba
- automatic update by autodist
* Wed Jan 25 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0-4mamba
- automatic update by autodist
* Sun Sep 04 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0-3mamba
- automatic update by autodist
* Fri Aug 19 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0-2mamba
- automatic update by autodist
* Wed Apr 20 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.0-1mamba
- update to 0.9.0
* Mon Feb 07 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.7-2mamba
- automatic update by autodist
* Thu Dec 16 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.7-1mamba
- update to 0.8.7
* Thu Dec 16 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.6-4mamba
- automatic rebuild by autodist
* Wed Jun 30 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.6-3mamba
- automatic rebuild by autodist
* Sat Dec 26 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.6-2mamba
- rebuild for kernel 2.6.31
* Sat Dec 26 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.6-1mamba
- update to 0.8.6
* Sun Aug 09 2009 Automatic Build System <autodist@mambasoft.it> 0.8.5-1mamba
- automatic update by autodist
* Fri Oct 24 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.4-1mamba
- automatic update by autodist
* Wed Jul 18 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.2-2mamba
- update to 0.8.2
* Sat Mar 24 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.2-1qilnx
- update to version 0.8.2pre1 by autospec
* Fri Sep 22 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.1pre1-2qilnx
- rebuilt for 2.6.18 kernel
* Mon May 15 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 0.8.0.cvs20060516-1qilnx
- package created by autospec