SPECS: trac-plugin-ldapplugin.spec - add trac.schema

glen glen at pld-linux.org
Mon May 26 17:27:38 CEST 2008


Author: glen                         Date: Mon May 26 15:27:38 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- add trac.schema

---- Files affected:
SPECS:
   trac-plugin-ldapplugin.spec (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SPECS/trac-plugin-ldapplugin.spec
diff -u SPECS/trac-plugin-ldapplugin.spec:1.1 SPECS/trac-plugin-ldapplugin.spec:1.2
--- SPECS/trac-plugin-ldapplugin.spec:1.1	Mon May 26 14:45:52 2008
+++ SPECS/trac-plugin-ldapplugin.spec	Mon May 26 17:27:33 2008
@@ -1,6 +1,6 @@
 # $Revision$, $Date$
 %define		subver	r3718
-%define		rel		0.1
+%define		rel		0.4
 Summary:	LDAP extensions for Trac 0.10
 Name:		trac-plugin-ldapplugin
 Version:	0.5.1
@@ -9,6 +9,8 @@
 Group:		Applications/WWW
 Source0:	%{name}-r3718.tar.bz2
 # Source0-md5:	945bbc6b863929b22c829305634b41d5
+Source1:	http://trac-hacks.org/attachment/ticket/1431/trac.schema?format=raw
+# Source1-md5:	11ddf867bcfa7481dcd23fad77118ff0
 URL:		http://trac-hacks.org/wiki/LdapPlugin
 BuildRequires:	python-devel
 BuildRequires:	python-setuptools >= 0.6
@@ -17,6 +19,8 @@
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define		schemadir	/usr/share/openldap/schema
+
 %description
 This extension enables to use existing LDAP groups to grant
 permissions rather than defining permissions for every single user on
@@ -24,8 +28,18 @@
 (both users and groups permissions) in the LDAP directory itself
 rather than in the SQL backend.
 
+%package -n openldap-schema-trac
+Summary:	Trac LDAP schema
+Group:		Networking/Daemons
+Requires(post,postun):	sed >= 4.0
+Requires:	openldap-servers
+
+%description -n openldap-schema-trac
+This package contains trac.schema for openldap.
+
 %prep
 %setup -q -n %{name}-%{subver}
+cp -a %{SOURCE1} trac.schema
 
 %build
 %{__python} setup.py build
@@ -38,11 +52,25 @@
 	--optimize 2 \
 	--root=$RPM_BUILD_ROOT
 
+install -d $RPM_BUILD_ROOT%{schemadir}
+cp -a trac.schema $RPM_BUILD_ROOT%{schemadir}
+
 %py_postclean
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post -n openldap-schema-trac
+# dependant schemas: dyngroup, core (for dyngroup)
+%openldap_schema_register %{schemadir}/trac.schema -d dyngroup,core
+%service -q ldap restart
+
+%postun -n openldap-schema-trac
+if [ "$1" = "0" ]; then
+	%openldap_schema_unregister %{schemadir}/trac.schema
+	%service -q ldap restart
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc COPYING
@@ -50,12 +78,18 @@
 %dir %{py_sitescriptdir}/ldapplugin
 %{py_sitescriptdir}/ldapplugin/*.py[co]
 
+%files -n openldap-schema-trac
+%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.2  2008-05-26 15:27:33  glen
+- add trac.schema
+
 Revision 1.1  2008-05-26 12:45:52  glen
 - new
-
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/trac-plugin-ldapplugin.spec?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list