From 8cbddc5202f0e8a878d11828da8d94820da175ed Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 06:24:01 +0100 Subject: [PATCH] move rundir to /run and add tmpfiles.d file [release 0.9.3a-2mamba;Wed Jul 27 2016] --- lirc-0.9.3a-run_dir.patch | 14 ++++++++++++++ lirc.spec | 33 +++++++++++++++++++++++++++++++-- 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 lirc-0.9.3a-run_dir.patch diff --git a/lirc-0.9.3a-run_dir.patch b/lirc-0.9.3a-run_dir.patch new file mode 100644 index 0000000..b9ba940 --- /dev/null +++ b/lirc-0.9.3a-run_dir.patch @@ -0,0 +1,14 @@ +diff -Nru lirc-0.9.3a.orig/lirc_options.conf lirc-0.9.3a/lirc_options.conf +--- lirc-0.9.3a.orig/lirc_options.conf 2015-10-14 18:23:44.000000000 +0200 ++++ lirc-0.9.3a/lirc_options.conf 2016-07-27 16:58:54.007431761 +0200 +@@ -6,8 +6,8 @@ + nodaemon = False + driver = default + device = /dev/lirc0 +-output = /var/run/lirc/lircd +-pidfile = /var/run/lirc/lircd.pid ++output = /run/lirc/lircd ++pidfile = /run/lirc/lircd.pid + plugindir = /usr/lib/lirc/plugins + permission = 666 + allow-simulate = No diff --git a/lirc.spec b/lirc.spec index bc809fc..9c816c6 100644 --- a/lirc.spec +++ b/lirc.spec @@ -1,7 +1,7 @@ Name: lirc Version: 0.9.3a Epoch: 1 -Release: 1mamba +Release: 2mamba Summary: A package that allows you to decode and send infra-red signals Group: System/Hardware Vendor: openmamba @@ -12,6 +12,7 @@ URL: http://www.lirc.org/ #Source: http://downloads.sourceforge.net/project/lirc/LIRC/%{version}/lirc-debian-src-%{version}.tar.gz Source: http://downloads.sourceforge.net/project/lirc/LIRC/%{version}/lirc-%{version}.tar.bz2 #http://downloads.sourceforge.net/project/lirc/LIRC/%{version}/lirc-%{version}.tar.gz +Patch0: lirc-0.9.3a-run_dir.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -27,6 +28,7 @@ BuildRequires: libXdmcp-devel BuildRequires: help2man >= 1.36.3 ## FIXME: lirc has portaudio v.18 support but system has 19, patch needed #BuildConflicts: libportaudio-devel +%systemd_requires BuildRoot: %{_tmppath}/%{name}-%{version}-root %description @@ -43,9 +45,11 @@ This package contains static libraries and header files need for development. %prep %setup -q +%patch0 -p1 %build %configure \ + --localstatedir=/ \ --with-driver=none # --with-driver=all @@ -65,6 +69,11 @@ This package contains static libraries and header files need for development. #cp -a remotes/* %{buildroot}%{_sysconfdir}/lirc %makeinstall systemddir=%{_unitdir} +install -d -m0755 %{buildroot}%{_tmpfilesdir} +cat > %{buildroot}%{_tmpfilesdir}/lircd.conf << _EOF +d /run/lirc 755 root root +_EOF + %clean [ "%{buildroot}" != / ] && rm -rf %{buildroot} @@ -72,12 +81,28 @@ This package contains static libraries and header files need for development. if [ $1 -ge 1 ]; then systemctl -q daemon-reload fi +if [ $1 -ge 0 ]; then + %systemd_post lircd + %tmpfiles_create lircd.conf +fi +: + +%preun +%systemd_preun +: + +%postun +%systemd_postun_with_restart : %files %defattr(-,root,root) %dir %{_sysconfdir}/lirc -%{_sysconfdir}/lirc/* +%config %{_sysconfdir}/lirc/lirc_options.conf +%config(noreplace) %{_sysconfdir}/lirc/lircd.conf +%config(noreplace) %{_sysconfdir}/lirc/lircmd.conf +%dir %{_sysconfdir}/lirc/lircd.conf.d +%{_sysconfdir}/lirc/lircd.conf.d/README.conf.d %{_bindir}/* %{_sbindir}/lircd %{_sbindir}/lircmd @@ -85,6 +110,7 @@ fi %{_unitdir}/lircd.service %{_unitdir}/lircd.socket %{_unitdir}/lircmd.service +%{_tmpfilesdir}/lircd.conf %{_libdir}/liblirc_client.so.* %{_libdir}/liblirc.so.* %{_libdir}/liblirc_driver.so.* @@ -145,6 +171,9 @@ fi #%doc ChangeLog NEWS README TODO %changelog +* Wed Jul 27 2016 Silvan Calarco 0.9.3a-2mamba +- move rundir to /run and add tmpfiles.d file + * Fri May 20 2016 Silvan Calarco 0.9.3a-1mamba - update to 0.9.3a