lirc/lirc.spec

326 lines
9.8 KiB
RPMSpec

%define user_lirc 67
%define group_lirc 67
Name: lirc
Version: 0.10.2
Epoch: 1
Release: 2mamba
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: https://www.lirc.org/
Source: http://downloads.sourceforge.net/project/lirc/LIRC/%{version}/lirc-%{version}.tar.bz2
Patch0: lirc-0.9.4-run_dir.patch
Patch1: lirc-0.9.4-fix-devinput-conf.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libICE-devel
BuildRequires: libSM-devel
BuildRequires: libX11-devel
BuildRequires: libXdmcp-devel
BuildRequires: libalsa-devel
BuildRequires: libftdi1-devel
BuildRequires: libgcc
BuildRequires: libjack-devel
BuildRequires: libportaudio-devel
BuildRequires: libpython3-devel
BuildRequires: libstdc++6-devel
BuildRequires: libsystemd-devel
BuildRequires: libudev-devel
BuildRequires: libusb-compat-devel
BuildRequires: libusb-devel
BuildRequires: libuuid-devel
BuildRequires: libxcb-devel
## AUTOBUILDREQ-END
BuildRequires: help2man >= 1.36.3
Requires: PyYAML-py3
%systemd_requires
%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 needed for development.
%debug_package
%prep
%setup -q
#-D -T
#:<< _EOF
#%patch0 -p1
#%patch1 -p1
./autogen.sh
%build
#:<< _EOF
%configure \
PYTHON=%{__python3}
%make systemddir=%{_unitdir} VARRUNDIR=/run
#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} \
VARRUNDIR=/run \
STRIP=/bin/true
install -D -m0644 doc/plugindocs.mk %{buildroot}%{_docdir}/lirc/plugindocs/plugindocs.mk
install -d -m0755 %{buildroot}%{_tmpfilesdir}
cat > %{buildroot}%{_tmpfilesdir}/lircd.conf << _EOF
d /run/lirc 755 root root
_EOF
rm -f %{buildroot}%{_datadir}/lirc/lirc-%{version}.tar.gz
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%post
if [ $1 -ge 1 ]; then
systemctl -q daemon-reload
fi
groupadd lirc -g %{group_lirc} 2>/dev/null
useradd -u %{user_lirc} -g lirc \
-d /dev/null -s /sbin/nologin -c "Lirc user" lirc 2>/dev/null
%systemd_post lircd
%tmpfiles_create lircd.conf
:
%preun
%systemd_preun lircd
if [ $1 -eq 0 ]; then
groupdel lirc 2>/dev/null
userdel lirc 2>/dev/null
fi
:
%postun
%systemd_postun_with_restart lircd
:
%pretrans devel -p <lua>
-- Define the path to the symlink being replaced below.
path = "/usr/include/lirc/media"
st = posix.stat(path)
if st and st.type == "link" then
os.remove(path)
end
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/lirc
%config(noreplace) %{_sysconfdir}/lirc/lirc_options.conf
%config(noreplace) %{_sysconfdir}/lirc/lircd.conf
%config(noreplace) %{_sysconfdir}/lirc/lircmd.conf
%config %{_sysconfdir}/lirc/irexec.lircrc
%dir %{_sysconfdir}/lirc/lircd.conf.d
%config %{_sysconfdir}/lirc/lircd.conf.d/devinput.lircd.conf
%{_sysconfdir}/lirc/lircd.conf.d/README.conf.d
%{_bindir}/*
%{_sbindir}/lircd
%{_sbindir}/lircmd
%{_sbindir}/lirc-lsplugins
%{_sbindir}/lircd-setup
%{_sbindir}/lircd-uinput
%{_unitdir}/lircd.service
%{_unitdir}/lircd.socket
%{_unitdir}/lircmd.service
%{_unitdir}/irexec.service
%{_unitdir}/lircd-uinput.service
%{_unitdir}/lircd-setup.service
%{_tmpfilesdir}/lircd.conf
%{_libdir}/liblirc_client.so.*
%{_libdir}/liblirc.so.*
%{_libdir}/liblirc_driver.so.*
%{_libdir}/libirrecord.so.*
%dir %{_libdir}/lirc
%dir %{_libdir}/lirc/plugins
%{_libdir}/lirc/plugins/*
%dir %{python3_sitearch}/lirc
%{python3_sitearch}/lirc/*
%dir %{python3_sitearch}/lirc-setup
%{python3_sitearch}/lirc-setup/*
%dir %{_datadir}/lirc/python-pkg
%{_datadir}/lirc/python-pkg/*
%dir %{_datadir}/lirc
%dir %{_datadir}/lirc/configs
#%{_datadir}/lirc/lirc.hwdb
%{_datadir}/lirc/configs/*
%dir %{_datadir}/lirc/contrib
%{_datadir}/lirc/contrib/*
%dir %{_datadir}/lirc/doc
%{_datadir}/lirc/doc/*
%{_mandir}/man1/*.1*
%{_mandir}/man5/lircd.conf.5*
%{_mandir}/man5/lircrc.5*
%{_mandir}/man8/lircd-setup.8*
%{_mandir}/man8/lircd-uinput.8*
%{_mandir}/man8/lircd.8*
%{_mandir}/man8/lircmd.8*
%{_mandir}/man8/lircrcd.8*
%dir %{_localstatedir}/lib/lirc
%dir %{_localstatedir}/lib/lirc/images
%{_localstatedir}/lib/lirc/images/*
%dir %{_localstatedir}/lib/lirc/plugins
%{_localstatedir}/lib/lirc/plugins/*
%dir %{_docdir}/lirc
%{_docdir}/lirc/*
%doc AUTHORS COPYING
%files devel
%defattr(-,root,root)
%{_includedir}/lirc_*.h
%dir %{_includedir}/lirc
%{_includedir}/lirc/*.h
%{_includedir}/lirc/input_map.inc
#%dir %{_includedir}/lirc/include
#%{_includedir}/lirc/include/linux/input-event-codes.h
%{_includedir}/lirc/media
#%dir %{_includedir}/lirc/include/media
#%{_includedir}/lirc/include/media/lirc.h
%{_libdir}/libirrecord.so
%{_libdir}/liblirc_client.so
%{_libdir}/liblirc.so
%{_libdir}/liblirc_driver.so
%{_libdir}/pkgconfig/lirc.pc
%{_libdir}/pkgconfig/lirc-driver.pc
#%doc ChangeLog NEWS README
%changelog
* Tue Oct 25 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 0.10.2-2mamba
- devel: add pretrans script to remove symlink updated to directory
* Sat Oct 22 2022 Automatic Build System <autodist@mambasoft.it> 0.10.2-1mamba
- automatic version update by autodist
* Sun Dec 20 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 0.10.1-2mamba
- rebuilt
* Tue Jun 05 2018 Automatic Build System <autodist@mambasoft.it> 0.10.1-1mamba
- automatic version update by autodist
* Thu Oct 13 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.4b-1mamba
- update to 0.9.4b
* Wed Aug 24 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.4-5mamba
- don't replace lirc_options.conf on update
* Wed Aug 24 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.4-4mamba
- install plugindocs.mk
* Fri Aug 12 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.4-3mamba
- patches for systemd service files and inpudev conf
* Thu Aug 11 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.4-2mamba
- require PyYAML-py3 for lirc-setup and create lirc system user and group
- move docs required by lirc-setup from -devel to main package
* Thu Aug 11 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.4-1mamba
- update to 0.9.4
* Thu Aug 11 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.3a-3mamba
- rebuilt with libirman-devel
* Wed Jul 27 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.3a-2mamba
- move rundir to /run and add tmpfiles.d file
* Fri May 20 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.3a-1mamba
- update to 0.9.3a
* Wed Oct 07 2015 Automatic Build System <autodist@mambasoft.it> 0.9.3-1mamba
- automatic version update by autodist
* Mon Mar 09 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.2a-1mamba
- update to 0.9.2a
* Fri Jan 23 2015 Automatic Build System <autodist@mambasoft.it> 0.9.2-1mamba
- automatic version update by autodist
* 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