Author: glen                         Date: Mon Sep 12 14:19:45 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- created openldap-schema-courier subpackage

---- Files affected:
SPECS:
   courier-authlib.spec (1.24 -> 1.25) 

---- Diffs:

================================================================
Index: SPECS/courier-authlib.spec
diff -u SPECS/courier-authlib.spec:1.24 SPECS/courier-authlib.spec:1.25
--- SPECS/courier-authlib.spec:1.24     Thu Sep  1 15:35:11 2005
+++ SPECS/courier-authlib.spec  Mon Sep 12 16:19:39 2005
@@ -3,7 +3,7 @@
 Summary(pl):   Biblioteka uwierzytelniania Couriera
 Name:          courier-authlib
 Version:       0.57
-Release:       1
+Release:       1.3
 License:       GPL
 Group:         Networking/Daemons
 Source0:       http://dl.sourceforge.net/courier/%{name}-%{version}.tar.bz2
@@ -32,6 +32,8 @@
 Obsoletes:     sqwebmail-auth-shadow
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                schemadir       /usr/share/openldap/schema
+
 %description
 The Courier authentication library provides authentication services
 for other Courier applications.
@@ -159,6 +161,15 @@
 umożliwiającą obsługę żądań uwierzytelnienia przez zewnętrzny program
 komunikujący się poprzez wiadomości wysyłane na stdin i stdout.
 
+%package -n openldap-schema-courier
+Summary:       Courier LDAP schema
+Group:         Networking/Daemons
+Requires(post,postun): sed >= 4.0
+Requires:      openldap-servers
+
+%description -n openldap-schema-courier
+This package contains Courier authldap.schema for openldap.
+
 %prep
 %setup -q
 %patch0 -p1
@@ -198,9 +209,10 @@
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/authlib/userdb}
+install -d 
$RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/authlib/userdb,%{schemadir}}
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-authlib
+install authldap.schema $RPM_BUILD_ROOT%{schemadir}/courier.schema
 
 # make config files
 ./sysconftool $RPM_BUILD_ROOT%{_sysconfdir}/authlib/*.dist
@@ -295,6 +307,41 @@
        /etc/rc.d/init.d/courier-authlib restart
 fi
 
+%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
+               /^#include.*\(nis\)\.schema/{
+                       s/^#//
+               }
+       ' /etc/openldap/slapd.conf
+fi
+
+if [ -f /var/lock/subsys/ldap ]; then
+       /etc/rc.d/init.d/ldap restart >&2
+fi
+
+%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
+
+       if [ -f /var/lock/subsys/ldap ]; then
+               /etc/rc.d/init.d/ldap restart >&2 || :
+       fi
+fi
+
 %triggerin -- courier < 0.48
 if [ -f /etc/courier/authdaemonrc ]; then
        . /etc/courier/authdaemonrc
@@ -536,12 +583,19 @@
 %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthpipe.so.*.*.*
 %{_libexecdir}/courier-authlib/libauthpipe.la
 
+%files -n openldap-schema-courier
+%defattr(644,root,root,755)
+%{schemadir}/*.schema
+
 %define date   %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
 * %{date} PLD Team <[EMAIL PROTECTED]>
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.25  2005/09/12 14:19:39  glen
+- created openldap-schema-courier subpackage
+
 Revision 1.24  2005/09/01 13:35:11  arekm
 - use external, pldized init script
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/courier-authlib.spec?r1=1.24&r2=1.25&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to