use systemd-rpm macros in spec file

Resolves: #850247
This commit is contained in:
Jan Vcelak 2013-03-06 23:09:13 +01:00
parent 705b2a5032
commit 51d38be75b

View File

@ -87,9 +87,9 @@ Summary: LDAP server
License: OpenLDAP
Requires: openldap%{?_isa} = %{version}-%{release}, libdb-utils
Requires(pre): shadow-utils
Requires(post): systemd-units, systemd-sysv, chkconfig
Requires(preun): systemd-units
Requires(postun): systemd-units
Requires(post): systemd, systemd-sysv, chkconfig
Requires(preun): systemd
Requires(postun): systemd
BuildRequires: libdb-devel
BuildRequires: systemd-units
Group: System Environment/Daemons
@ -391,11 +391,7 @@ exit 0
%post servers
/sbin/ldconfig
if [ $1 -eq 1 ]; then
# initial installation
%{systemctl_bin} daemon-reload &>/dev/null || :
fi
%systemd_post slapd.service
# generate sample TLS certificate for server (will not replace)
%{_libexecdir}/openldap/generate-server-cert.sh -o &>/dev/null || :
@ -460,22 +456,14 @@ fi
exit 0
%preun servers
if [ $1 -eq 0 ]; then
# package removal
%{systemctl_bin} --no-reload disable slapd.service &>/dev/null || :
%{systemctl_bin} stop slapd.service &>/dev/null || :
fi
%systemd_preun slapd.service
%postun servers
/sbin/ldconfig
%{systemctl_bin} daemon-reload &>/dev/null || :
if [ $1 -ge 1 ]; then
# package upgrade
%{systemctl_bin} try-restart slapd.service &>/dev/null || :
fi
exit 0
%systemd_postun_with_restart slapd.service
%post devel -p /sbin/ldconfig
@ -621,6 +609,7 @@ exit 0
* Wed Mar 06 2013 Jan Vcelak <jvcelak@fedoraproject.org> 2.4.34-1
- new upstream release (#917603)
- fix: slapcat segfaults if cn=config.ldif not present (#872784)
- use systemd-rpm macros in spec file (#850247)
* Thu Jan 31 2013 Jan Synáček <jsynacek@redhat.com> 2.4.33-4
- rebuild against new cyrus-sasl