use new systemd-rpm macros (#850074)
This commit is contained in:
parent
2688b643e3
commit
9d78e7701c
25
cups.spec
25
cups.spec
@ -12,7 +12,7 @@
|
|||||||
Summary: Common Unix Printing System
|
Summary: Common Unix Printing System
|
||||||
Name: cups
|
Name: cups
|
||||||
Version: 1.5.4
|
Version: 1.5.4
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
|
Source: http://ftp.easysw.com/pub/cups/%{version}/cups-%{version}-source.tar.bz2
|
||||||
@ -440,10 +440,7 @@ php --no-php-ini \
|
|||||||
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if [ $1 -eq 1 ] ; then
|
%systemd_post %{name}.path %{name}.socket %{name}.service
|
||||||
# Initial installation
|
|
||||||
/bin/systemctl enable cups.{service,socket,path} >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Remove old-style certs directory; new-style is /var/run
|
# Remove old-style certs directory; new-style is /var/run
|
||||||
# (see bug #194581 for why this is necessary).
|
# (see bug #194581 for why this is necessary).
|
||||||
@ -472,22 +469,17 @@ exit 0
|
|||||||
%postun libs -p /sbin/ldconfig
|
%postun libs -p /sbin/ldconfig
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ $1 -eq 0 ] ; then
|
%systemd_preun %{name}.path %{name}.socket %{name}.service
|
||||||
# Package removal, not upgrade
|
|
||||||
/bin/systemctl --no-reload disable %{name}.path %{name}.socket %{name}.service >/dev/null 2>&1 || :
|
|
||||||
/bin/systemctl stop %{name}.path %{name}.socket %{name}.service >/dev/null 2>&1 || :
|
|
||||||
%if %use_alternatives
|
%if %use_alternatives
|
||||||
|
if [ $1 -eq 0 ] ; then
|
||||||
/usr/sbin/alternatives --remove print %{_bindir}/lpr.cups
|
/usr/sbin/alternatives --remove print %{_bindir}/lpr.cups
|
||||||
%endif
|
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
%systemd_postun_with_restart %{name}.service
|
||||||
if [ $1 -ge 1 ]; then
|
|
||||||
# Package upgrade, not uninstall
|
|
||||||
/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%triggerun -- %{name} < 1:1.5.0-22
|
%triggerun -- %{name} < 1:1.5.0-22
|
||||||
@ -656,6 +648,9 @@ rm -f %{cups_serverbin}/backend/smb
|
|||||||
%{_mandir}/man1/ipptool.1.gz
|
%{_mandir}/man1/ipptool.1.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Aug 21 2012 Jiri Popelka <jpopelka@redhat.com> 1:1.5.4-2
|
||||||
|
- use new systemd-rpm macros (#850074)
|
||||||
|
|
||||||
* Thu Jul 26 2012 Jiri Popelka <jpopelka@redhat.com> 1:1.5.4-1
|
* Thu Jul 26 2012 Jiri Popelka <jpopelka@redhat.com> 1:1.5.4-1
|
||||||
- 1.5.4
|
- 1.5.4
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user