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

courier-authlib.spec

index 2d7fd67125ddbe437342bc3ebc58f4eab4382667..d1ead2ced821ffc0e7c1ef6367024a1a90658c26 100644 (file)
@@ -22,7 +22,7 @@ BuildRequires:        mysql-devel
 BuildRequires: openldap-devel >= 2.3.0
 BuildRequires: pam-devel
 BuildRequires: postgresql-devel
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rpmbuild(macros) >= 1.304
 BuildRequires: sed >= 4.0
 BuildRequires: sysconftool
 BuildRequires: zlib-devel
@@ -360,32 +360,12 @@ fi
 %service -q courier-authlib restart
 
 %post -n openldap-schema-courier
-if ! grep -q %{schemadir}/courier.schema /etc/openldap/slapd.conf; then
-       sed -i -e '
-               /^include.*local.schema/{
-                       i\
-include                %{schemadir}/courier.schema
-               }
-
-               # enable dependant schemas: nis.schema, cosine.schema
-               /^#include.*\(nis\|cosine\)\.schema/{
-                       s/^#//
-               }
-       ' /etc/openldap/slapd.conf
-fi
+%openldap_schema_register %{schemadir}/courier.schema -d nis,cosine
 %service -q ldap restart
 
 %postun -n openldap-schema-courier
 if [ "$1" = "0" ]; then
-       if grep -q %{schemadir}/courier.schema /etc/openldap/slapd.conf; then
-               sed -i -e '
-               /^include.*\/usr\/share\/openldap\/schema\/courier.schema/d
-
-               # for symmetry it would be nice if we disable enabled schemas in post,
-               # but we really can not do that, it would break something else.
-               ' /etc/openldap/slapd.conf
-       fi
-
+       %openldap_schema_unregister %{schemadir}/courier.schema
        %service -q ldap restart
 fi
 
This page took 0.103648 seconds and 4 git commands to generate.