SPECS: evolution-data-server.spec - created openldap-schema-evolut...

glen glen at pld-linux.org
Sat Aug 20 14:36:31 CEST 2005


Author: glen                         Date: Sat Aug 20 12:36:31 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- created openldap-schema-evolutionperson subpackage

---- Files affected:
SPECS:
   evolution-data-server.spec (1.53 -> 1.54) 

---- Diffs:

================================================================
Index: SPECS/evolution-data-server.spec
diff -u SPECS/evolution-data-server.spec:1.53 SPECS/evolution-data-server.spec:1.54
--- SPECS/evolution-data-server.spec:1.53	Mon Aug 15 02:22:14 2005
+++ SPECS/evolution-data-server.spec	Sat Aug 20 14:36:25 2005
@@ -46,12 +46,23 @@
 Requires:	libsoup >= 2.2.3
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define		schemadir	/usr/share/openldap/schema
+
 %description
 The Evolution data server for the calendar and addressbook.
 
 %description -l pl
 Serwer danych Evolution dla kalendarza i książki adresowej.
 
+%package -n openldap-schema-evolutionperson
+Summary:	evolutionperson LDAP schema
+Group:		Networking/Daemons
+Requires(post,postun):	sed >= 4.0
+Requires:	openldap-servers
+
+%description -n openldap-schema-evolutionperson
+This package contains evolutionperson.schema for openldap.
+
 %package devel
 Summary:	Evolution data server development files
 Summary(pl):	Pliki programistyczne serwera danych evolution
@@ -142,6 +153,9 @@
 
 rm -r $RPM_BUILD_ROOT%{_datadir}/locale/no
 
+install -d $RPM_BUILD_ROOT%{schemadir}
+install addressbook/backends/ldap/evolutionperson.schema $RPM_BUILD_ROOT%{schemadir}
+
 %find_lang %{name} --all-name
 
 %clean
@@ -155,6 +169,34 @@
 /sbin/ldconfig
 %scrollkeeper_update_postun
 
+%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
+
+%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
+fi
+
+
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog NEWS* README
@@ -179,6 +221,10 @@
 %endif
 %{_pixmapsdir}/%{name}-%{mver}
 
+%files -n openldap-schema-evolutionperson
+%defattr(644,root,root,755)
+%{schemadir}/*.schema
+
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/*.so
@@ -197,6 +243,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.54  2005/08/20 12:36:25  glen
+- created openldap-schema-evolutionperson subpackage
+
 Revision 1.53  2005/08/15 00:22:14  wolf
 - fix w/o ldap
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/evolution-data-server.spec?r1=1.53&r2=1.54&f=u




More information about the pld-cvs-commit mailing list