systemd: configure and use internally provided systemd files [release 2.3.0-2mamba;Tue Sep 17 2019]
This commit is contained in:
parent
f998f8ecbf
commit
860cb24b4e
35
cups.spec
35
cups.spec
@ -7,7 +7,7 @@
|
||||
|
||||
Name: cups
|
||||
Version: 2.3.0
|
||||
Release: 1mamba
|
||||
Release: 2mamba
|
||||
Summary: Common UNIX Printing System
|
||||
Group: System/Spooling
|
||||
Vendor: openmamba
|
||||
@ -125,12 +125,12 @@ done
|
||||
install -m0644 cups/string-private.h %{buildroot}%{_includedir}/cups/string-private.h
|
||||
install -m0644 cups/debug-private.h %{buildroot}%{_includedir}/cups/debug-private.h
|
||||
|
||||
# systemd
|
||||
install -D -m0644 %{SOURCE3} %{buildroot}%{_unitdir}/cups.service
|
||||
install -D -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/cups.socket
|
||||
install -D -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/cups.path
|
||||
install -D -m0644 %{SOURCE6} %{buildroot}%{_unitdir}/cups-lpd.socket
|
||||
install -D -m0644 %{SOURCE7} %{buildroot}%{_unitdir}/cups-lpd@.service
|
||||
## systemd
|
||||
#install -D -m0644 %{SOURCE3} %{buildroot}%{_unitdir}/cups.service
|
||||
#install -D -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/cups.socket
|
||||
#install -D -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/cups.path
|
||||
#install -D -m0644 %{SOURCE6} %{buildroot}%{_unitdir}/cups-lpd.socket
|
||||
#install -D -m0644 %{SOURCE7} %{buildroot}%{_unitdir}/cups-lpd@.service
|
||||
|
||||
# basic cups client configuration file
|
||||
echo "ServerName /run/cups/cups.sock" > %{buildroot}%{_sysconfdir}/cups/client.conf
|
||||
@ -163,6 +163,8 @@ chmod 755 %{buildroot}%{_libdir}/*.a
|
||||
/usr/sbin/groupadd lpadmin -g %{lpadmin_gid} &>/dev/null
|
||||
/usr/sbin/useradd lpadmin -c "Cups printing daemon" -d /dev/null \
|
||||
-s /bin/false -u %{lpadmin_uid} -g %{lpadmin_gid} &>/dev/null
|
||||
%systemd_pre org.cups.cupsd
|
||||
%systemd_pre org.cups.cups-lpd.socket
|
||||
exit 0
|
||||
|
||||
%post
|
||||
@ -175,16 +177,18 @@ if [ $1 -gt 1 ]; then
|
||||
sed -i "s|ErrorPolicy stop-printer|ErrorPolicy retry-job|" %{_sysconfdir}/cups/printers.conf
|
||||
fi
|
||||
fi
|
||||
%systemd_post cups
|
||||
%systemd_post org.cups.cupsd
|
||||
%systemd_post org.cups.cups-lpd.socket
|
||||
if [ $1 -ge 1 ]; then
|
||||
systemctl -q daemon-reload
|
||||
systemctl -q enable cups
|
||||
systemctl -q enable org.cups.cupsd
|
||||
fi
|
||||
:
|
||||
|
||||
%preun
|
||||
# erase
|
||||
%systemd_preun cups
|
||||
%systemd_preun org.cups.cups-lpd.socket
|
||||
%systemd_preun org.cups.cupsd
|
||||
if [ $1 -eq 0 ]; then
|
||||
/usr/sbin/groupdel lp &>/dev/null
|
||||
/usr/sbin/userdel lp &>/dev/null
|
||||
@ -195,7 +199,8 @@ fi
|
||||
:
|
||||
|
||||
%postun
|
||||
%systemd_postun_with_restart cups
|
||||
%systemd_postun_with_restart org.cups.cupsd
|
||||
%systemd_postun_with_restart org.cups.cups-lpd
|
||||
:
|
||||
|
||||
%posttrans
|
||||
@ -253,11 +258,6 @@ fi
|
||||
%{_unitdir}/org.cups.cupsd.socket
|
||||
%{_unitdir}/org.cups.cups-lpd.socket
|
||||
%{_unitdir}/org.cups.cups-lpd@.service
|
||||
%{_unitdir}/cups.path
|
||||
%{_unitdir}/cups.service
|
||||
%{_unitdir}/cups.socket
|
||||
%{_unitdir}/cups-lpd.socket
|
||||
%{_unitdir}/cups-lpd@.service
|
||||
%{_datadir}/applications/cups.desktop
|
||||
%{_datadir}/icons/hicolor/*/apps/cups.png
|
||||
%dir %{_datadir}/cups
|
||||
@ -305,6 +305,9 @@ fi
|
||||
#%doc CHANGES.txt README.txt
|
||||
|
||||
%changelog
|
||||
* Tue Sep 17 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.0-2mamba
|
||||
- systemd: configure and use internally provided systemd files
|
||||
|
||||
* Mon Sep 02 2019 Automatic Build System <autodist@mambasoft.it> 2.3.0-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user