move rundir to /run and add tmpfiles.d file [release 0.9.3a-2mamba;Wed Jul 27 2016]

This commit is contained in:
Silvan Calarco 2024-01-06 06:24:01 +01:00
parent 8aae2cb8c4
commit 8cbddc5202
2 changed files with 45 additions and 2 deletions

14
lirc-0.9.3a-run_dir.patch Normal file
View File

@ -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

View File

@ -1,7 +1,7 @@
Name: lirc Name: lirc
Version: 0.9.3a Version: 0.9.3a
Epoch: 1 Epoch: 1
Release: 1mamba Release: 2mamba
Summary: A package that allows you to decode and send infra-red signals Summary: A package that allows you to decode and send infra-red signals
Group: System/Hardware Group: System/Hardware
Vendor: openmamba 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-debian-src-%{version}.tar.gz
Source: http://downloads.sourceforge.net/project/lirc/LIRC/%{version}/lirc-%{version}.tar.bz2 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 #http://downloads.sourceforge.net/project/lirc/LIRC/%{version}/lirc-%{version}.tar.gz
Patch0: lirc-0.9.3a-run_dir.patch
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
@ -27,6 +28,7 @@ BuildRequires: libXdmcp-devel
BuildRequires: help2man >= 1.36.3 BuildRequires: help2man >= 1.36.3
## FIXME: lirc has portaudio v.18 support but system has 19, patch needed ## FIXME: lirc has portaudio v.18 support but system has 19, patch needed
#BuildConflicts: libportaudio-devel #BuildConflicts: libportaudio-devel
%systemd_requires
BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
@ -43,9 +45,11 @@ This package contains static libraries and header files need for development.
%prep %prep
%setup -q %setup -q
%patch0 -p1
%build %build
%configure \ %configure \
--localstatedir=/ \
--with-driver=none --with-driver=none
# --with-driver=all # --with-driver=all
@ -65,6 +69,11 @@ This package contains static libraries and header files need for development.
#cp -a remotes/* %{buildroot}%{_sysconfdir}/lirc #cp -a remotes/* %{buildroot}%{_sysconfdir}/lirc
%makeinstall systemddir=%{_unitdir} %makeinstall systemddir=%{_unitdir}
install -d -m0755 %{buildroot}%{_tmpfilesdir}
cat > %{buildroot}%{_tmpfilesdir}/lircd.conf << _EOF
d /run/lirc 755 root root
_EOF
%clean %clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot} [ "%{buildroot}" != / ] && rm -rf %{buildroot}
@ -72,12 +81,28 @@ This package contains static libraries and header files need for development.
if [ $1 -ge 1 ]; then if [ $1 -ge 1 ]; then
systemctl -q daemon-reload systemctl -q daemon-reload
fi fi
if [ $1 -ge 0 ]; then
%systemd_post lircd
%tmpfiles_create lircd.conf
fi
:
%preun
%systemd_preun
:
%postun
%systemd_postun_with_restart
: :
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_sysconfdir}/lirc %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}/* %{_bindir}/*
%{_sbindir}/lircd %{_sbindir}/lircd
%{_sbindir}/lircmd %{_sbindir}/lircmd
@ -85,6 +110,7 @@ fi
%{_unitdir}/lircd.service %{_unitdir}/lircd.service
%{_unitdir}/lircd.socket %{_unitdir}/lircd.socket
%{_unitdir}/lircmd.service %{_unitdir}/lircmd.service
%{_tmpfilesdir}/lircd.conf
%{_libdir}/liblirc_client.so.* %{_libdir}/liblirc_client.so.*
%{_libdir}/liblirc.so.* %{_libdir}/liblirc.so.*
%{_libdir}/liblirc_driver.so.* %{_libdir}/liblirc_driver.so.*
@ -145,6 +171,9 @@ fi
#%doc ChangeLog NEWS README TODO #%doc ChangeLog NEWS README TODO
%changelog %changelog
* 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 * Fri May 20 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 0.9.3a-1mamba
- update to 0.9.3a - update to 0.9.3a