]> git.pld-linux.org Git - packages/evolution-data-server.git/commitdiff
- use %openldap_schema_{un,}register macros
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 2 Jun 2006 21:18:50 +0000 (21:18 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    evolution-data-server.spec -> 1.76

evolution-data-server.spec

index bcc7acd26a3de6e33d6a83abdda84be3a6ceb916..0f9fd7bbe4a662cbd6aed4c9278740b22b1080d4 100644 (file)
@@ -39,7 +39,7 @@ BuildRequires:        nspr-devel
 BuildRequires: nss-devel
 %{?with_ldap:BuildRequires:    openldap-devel >= 2.3.0}
 BuildRequires: pkgconfig
-BuildRequires: rpmbuild(macros) >= 1.197
+BuildRequires: rpmbuild(macros) >= 1.304
 Requires(post,postun): scrollkeeper
 Requires:      %{name}-libs = %{version}-%{release}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -186,30 +186,13 @@ rm -rf $RPM_BUILD_ROOT
 %postun        libs -p /sbin/ldconfig
 
 %post -n openldap-schema-evolutionperson
-if ! grep -q %{schemadir}/evolutionperson.schema /etc/openldap/slapd.conf; then
-       sed -i -e '
-               /^include.*local.schema/{
-                       i\
-include                %{schemadir}/evolutionperson.schema
-               }
-       ' /etc/openldap/slapd.conf
-fi
-
-if [ -f /var/lock/subsys/ldap ]; then
-       /etc/rc.d/init.d/ldap restart >&2
-fi
+%openldap_schema_register %{schemadir}/evolutionperson.schema
+%service -q ldap restart
 
 %postun -n openldap-schema-evolutionperson
 if [ "$1" = "0" ]; then
-       if grep -q %{schemadir}/evolutionperson.schema /etc/openldap/slapd.conf; then
-               sed -i -e '
-               /^include.*\/usr\/share\/openldap\/schema\/evolutionperson.schema/d
-               ' /etc/openldap/slapd.conf
-       fi
-
-       if [ -f /var/lock/subsys/ldap ]; then
-               /etc/rc.d/init.d/ldap restart >&2 || :
-       fi
+       %openldap_schema_unregister %{schemadir}/evolutionperson.schema
+       %service -q ldap restart
 fi
 
 %files -f %{name}.lang
This page took 0.045462 seconds and 4 git commands to generate.