SPECS: openldap-schema-mozillaorgperson.spec (NEW) - created

glen glen at pld-linux.org
Fri Aug 26 01:05:12 CEST 2005


Author: glen                         Date: Thu Aug 25 23:05:12 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- created

---- Files affected:
SPECS:
   openldap-schema-mozillaorgperson.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SPECS/openldap-schema-mozillaorgperson.spec
diff -u /dev/null SPECS/openldap-schema-mozillaorgperson.spec:1.1
--- /dev/null	Fri Aug 26 01:05:12 2005
+++ SPECS/openldap-schema-mozillaorgperson.spec	Fri Aug 26 01:05:07 2005
@@ -0,0 +1,82 @@
+# $Revision$, $Date$
+Summary:	Mozilla LDAP schema
+Name:		openldap-schema-mozillaorgperson
+Version:	0.6.3
+Release:	0.2
+Epoch:		0
+License:	?
+Group:		Networking/Daemons
+Source0:	mozillaOrgPerson.schema
+URL:		https://bugzilla.mozilla.org/show_bug.cgi?id=116692
+Requires(post,postun):	sed >= 4.0
+Requires:	openldap-servers
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define		schemadir	/usr/share/openldap/schema
+
+%description
+This package contains LDAPv3 schema for use with the Mozilla Address
+Book.
+
+%prep
+%setup -q -c -T
+cp %{SOURCE0} .
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{schemadir}
+
+install *.schema $RPM_BUILD_ROOT%{schemadir}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+if ! grep -q %{schemadir}/mozillaOrgPerson.schema /etc/openldap/slapd.conf; then
+	sed -i -e '
+		/^include.*local.schema/{
+			i\
+include		%{schemadir}/mozillaOrgPerson.schema
+		}
+
+		# enable dependant schemas: cosine, inetorgperson and core
+		/^#include.*\(cosine\|inetorgperson\|core\)\.schema/{
+			s/^#//
+		}
+	' /etc/openldap/slapd.conf
+fi
+
+if [ -f /var/lock/subsys/ldap ]; then
+	/etc/rc.d/init.d/ldap restart >&2 || :
+fi
+
+%postun
+if [ "$1" = "0" ]; then
+	if grep -q %{schemadir}/mozillaOrgPerson.schema /etc/openldap/slapd.conf; then
+		sed -i -e '
+		/^include.*\/usr\/share\/openldap\/schema\/mozillaOrgPerson\.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
+
+%files
+%defattr(644,root,root,755)
+%{schemadir}/*.schema
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2005/08/25 23:05:07  glen
+- created
+
================================================================



More information about the pld-cvs-commit mailing list