Author: glen                         Date: Sun Feb 27 20:40:28 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- create openldap-schema-horde package

---- Files affected:
SPECS:
   horde.spec (1.81 -> 1.82) 

---- Diffs:

================================================================
Index: SPECS/horde.spec
diff -u SPECS/horde.spec:1.81 SPECS/horde.spec:1.82
--- SPECS/horde.spec:1.81       Sun Feb 27 20:30:05 2005
+++ SPECS/horde.spec    Sun Feb 27 21:40:22 2005
@@ -13,7 +13,7 @@
 Summary(pt_BR):        Componentes comuns do Horde usados por todos os módulos
 Name:          horde
 Version:       3.0.3
-Release:       2.37
+Release:       2.40
 License:       LGPL
 Vendor:                The Horde Project
 Group:         Development/Languages/PHP
@@ -92,6 +92,16 @@
 com relaçăo ao Horde e seus módulos), por favor visite
 <http://www.horde.org/>.
 
+# FIXME: package name?
+%package -n openldap-schema-horde
+Summary:       Horde LDAP schema
+Group:         Networking/Daemons
+Requires(post,pre): sed >= 4.0
+Requires:      openldap-servers
+
+%description -n openldap-schema-horde
+This package contains horde.schema for openldap.
+
 %prep
 %setup -q
 %patch0 -p1
@@ -107,7 +117,8 @@
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name} \
        $RPM_BUILD_ROOT%{_appdir}/{admin,js,services} \
        $RPM_BUILD_ROOT%{_appdir}/{docs,lib,locale,templates,themes} \
-       $RPM_BUILD_ROOT/var/log/%{name}
+       $RPM_BUILD_ROOT/var/log/%{name} \
+       $RPM_BUILD_ROOT/usr/share/openldap/schema
 
 cp -pR *.php                   $RPM_BUILD_ROOT%{_appdir}
 for i in config/*.php.dist; do
@@ -134,6 +145,8 @@
 
 > $RPM_BUILD_ROOT/var/log/%{name}/%{name}.log
 
+install scripts/ldap/horde.schema $RPM_BUILD_ROOT/usr/share/openldap/schema
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -171,9 +184,11 @@
 Look into directory %{_defaultdocdir}/%{name}-%{version}/scripts/sql
 to find out how to do this for Your database.
 
-If You've chosen LDAP authorization, please install php-ldap package and
-setup ldap schema from %{_defaultdocdir}/%{name}-%{version}/scripts/ldap.
-NOTE: You don't need SQL database, if You use LDAP for authorization.
+If You've chosen LDAP authorization, please install php-ldap package.
+To configure your openldap server to use horde schema, install
+openldap-schema-horde package.
+
+NOTE: You don't need SQL database if You use LDAP for authorization.
 
 EOF
 # '
@@ -198,6 +213,30 @@
        fi
 fi
 
+%post -n openldap-schema-horde
+if ! grep -q /usr/share/openldap/schema/horde.schema /etc/openldap/slapd.conf; 
then
+       sed -i -e '
+               /^include.*local.schema/{
+                       i\
+include                /usr/share/openldap/schema/horde.schema
+               }' /etc/openldap/slapd.conf
+fi
+
+if [ -f /var/lock/subsys/ldap ]; then
+    /etc/rc.d/init.d/ldap restart >&2
+fi
+
+%preun -n openldap-schema-horde
+if grep -q /usr/share/openldap/schema/horde.schema /etc/openldap/slapd.conf; 
then
+       sed -i -e '
+       /^include.*\/usr\/share\/openldap\/schema\/horde.schema/d
+       ' /etc/openldap/slapd.conf
+fi
+
+if [ -f /var/lock/subsys/ldap ]; then
+    /etc/rc.d/init.d/ldap restart >&2 || :
+fi
+
 %triggerpostun -- horde <= 2.2.7-2
 for i in horde.php html.php lang.php mime_drivers.php mime_mapping.php 
motd.php prefs.php registry.php; do
        if [ -f /home/services/httpd/html/horde/config/$i.rpmsave ]; then
@@ -273,12 +312,19 @@
 %dir %attr(750,root,http) /var/log/%{name}
 %ghost %attr(770,root,http) /var/log/%{name}/%{name}.log
 
+%files -n openldap-schema-horde
+%defattr(644,root,root,755)
+/usr/share/openldap/schema/*.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.82  2005/02/27 20:40:22  glen
+- create openldap-schema-horde package
+
 Revision 1.81  2005/02/27 19:30:05  glen
 - do not make Administrator as admins by clean install
 - %post message needs not to be wrapped by 70 chars
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/horde.spec?r1=1.81&r2=1.82&f=u


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

Reply via email to