Use new systemd macros
https://bugzilla.redhat.com/show_bug.cgi?id=850264
This commit is contained in:
parent
2c8ae8fcbd
commit
65d9e94bca
@ -13,11 +13,10 @@ Source0: http://alioth.debian.org/download.php/%{upstream_build}/%{name}-
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: graphviz
|
||||
BuildRequires: systemd-devel
|
||||
BuildRequires: systemd-units
|
||||
|
||||
Requires(post): systemd-units
|
||||
Requires(preun): systemd-units
|
||||
Requires(postun): systemd-units
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
Requires: pcsc-ifd-handler
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
@ -89,24 +88,13 @@ rm $RPM_BUILD_ROOT%{_docdir}/pcsc-lite/README.DAEMON
|
||||
|
||||
|
||||
%post
|
||||
if [ $1 -eq 1 ] ; then
|
||||
# Initial installation
|
||||
/bin/systemctl enable pcscd.socket >/dev/null 2>&1 || :
|
||||
fi
|
||||
%systemd_post pcscd.socket pcscd.service
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
/bin/systemctl --no-reload disable pcscd.service pcscd.socket >/dev/null 2>&1 || :
|
||||
/bin/systemctl stop pcscd.service pcscd.socket >/dev/null 2>&1 || :
|
||||
fi
|
||||
%systemd_preun pcscd.socket pcscd.service
|
||||
|
||||
%postun
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ $1 -ge 1 ] ; then
|
||||
# Package upgrade, not uninstall
|
||||
/bin/systemctl try-restart pcscd.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%systemd_postun_with_restart pcscd.socket pcscd.service
|
||||
|
||||
%post libs -p /sbin/ldconfig
|
||||
|
||||
@ -144,6 +132,7 @@ fi
|
||||
%changelog
|
||||
* Thu Feb 28 2013 Kalev Lember <kalevlember@gmail.com> - 1.8.8-1
|
||||
- Update to 1.8.8
|
||||
- Use new systemd macros (#850264)
|
||||
|
||||
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.7-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
Loading…
Reference in New Issue
Block a user