add preset file and force enabling daemon on install and upgrade [release 2.0.1-2mamba;Wed Nov 26 2014]

This commit is contained in:
Silvan Calarco 2024-01-05 21:35:02 +01:00
parent 024846d0b1
commit ee85b3c756

View File

@ -7,7 +7,7 @@
Name: cups
Version: 2.0.1
Release: 1mamba
Release: 2mamba
Summary: Common UNIX Printing System
Group: System/Spooling
Vendor: openmamba
@ -121,11 +121,11 @@ install -m0644 cups/string-private.h %{buildroot}%{_includedir}/cups/string-priv
install -m0644 cups/debug-private.h %{buildroot}%{_includedir}/cups/debug-private.h
# systemd
install -D -m0644 %{SOURCE3} %{buildroot}/lib/systemd/system/cups.service
install -D -m0644 %{SOURCE4} %{buildroot}/lib/systemd/system/cups.socket
install -D -m0644 %{SOURCE5} %{buildroot}/lib/systemd/system/cups.path
install -D -m0644 %{SOURCE6} %{buildroot}/lib/systemd/system/cups-lpd.socket
install -D -m0644 %{SOURCE7} %{buildroot}/lib/systemd/system/cups-lpd@.service
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
@ -137,6 +137,11 @@ rm -f %{buildroot}%{_datadir}/cups/data/testprint
rm -rf %{buildroot}%{_sysconfdir}/rc*.d/K36cups
rm -rf %{buildroot}%{_sysconfdir}/rc*.d/S81cups
install -d %{buildroot}%{_presetdir}
cat > %{buildroot}%{_presetdir}/50-cups.preset << _EOF
enable cups
_EOF
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
@ -163,6 +168,10 @@ if [ $1 -gt 1 ]; then
fi
fi
%systemd_post cups
if [ $1 -ge 1 ]; then
systemctl -q daemon-reload
systemctl -q enable cups
fi
:
%preun
@ -229,6 +238,7 @@ fi
%{_sbindir}/lpinfo
%{_sbindir}/lpmove
%{_sbindir}/reject
%{_presetdir}/50-cups.preset
%{_unitdir}/org.cups.cupsd.path
%{_unitdir}/org.cups.cupsd.service
%{_unitdir}/org.cups.cupsd.socket
@ -249,6 +259,7 @@ fi
%attr(0700,lp,root) %dir /var/spool/cups
%attr(1700,lp,root) %dir /var/spool/cups/tmp
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man7/backend.7*
%{_mandir}/man7/filter.7*
%{_mandir}/man7/notifier.7*
@ -263,7 +274,6 @@ fi
%{_libdir}/libcupsimage.so.*
%{_libdir}/libcupsmime.so.*
%{_libdir}/libcupsppdc.so.*
%{_mandir}/man5/*
%doc CREDITS.txt LICENSE.txt
%files -n libcups-devel
@ -284,6 +294,9 @@ fi
%doc CHANGES.txt README.txt
%changelog
* Wed Nov 26 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0.1-2mamba
- add preset file and force enabling daemon on install and upgrade
* Sat Nov 15 2014 Automatic Build System <autodist@mambasoft.it> 2.0.1-1mamba
- automatic version update by autodist