SPECS: pam-pam_ldap.spec - added openldap-schema-pam_ldap subpackage

wiget wiget at pld-linux.org
Sun Nov 20 21:47:14 CET 2005


Author: wiget                        Date: Sun Nov 20 20:47:14 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- added openldap-schema-pam_ldap subpackage

---- Files affected:
SPECS:
   pam-pam_ldap.spec (1.24 -> 1.25) 

---- Diffs:

================================================================
Index: SPECS/pam-pam_ldap.spec
diff -u SPECS/pam-pam_ldap.spec:1.24 SPECS/pam-pam_ldap.spec:1.25
--- SPECS/pam-pam_ldap.spec:1.24	Fri Sep  2 21:19:29 2005
+++ SPECS/pam-pam_ldap.spec	Sun Nov 20 21:47:05 2005
@@ -6,7 +6,7 @@
 Summary(pt_BR):	Módulo de autenticaçăo plugável (PAM) para o LDAP
 Name:		pam-%{modulename}
 Version:	180
-Release:	1
+Release:	2
 Epoch:		1
 Vendor:		Luke Howard <lukeh at padl.com>
 License:	LGPL
@@ -26,6 +26,7 @@
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		_libdir		/%{_lib}
+%define		schemadir	/usr/share/openldap/schema
 
 %description
 This is pam_ldap, a pluggable authentication module that can be used
@@ -51,6 +52,18 @@
 SSL, ypldapd, política de senhas do Netscape Directory Server,
 autorizaçăo de acesso, etc.
 
+%package -n openldap-schema-pam_ldap
+Summary:	pam_ldap LDAP schema
+Summary:	Schemat LDAP dla pam_ldap
+Group:		?
+Requires(post,postun):	sed >= 4.0
+Requires:	openldap-servers
+
+%description -n openldap-schema-pam_ldap
+This package contains LDAP schema used by pam_ldap.
+
+
+
 %prep
 %setup -q -n %{modulename}-%{version}
 %patch0 -p1
@@ -67,27 +80,79 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{schemadir}
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT \
 	INSTALLUSER=`id -u` \
 	INSTALLGROUP=`id -g`
 
+install ldapns.schema $RPM_BUILD_ROOT%{schemadir}/pam_ldap-ns.schema
+install ns-pwd-policy.schema $RPM_BUILD_ROOT%{schemadir}/
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post -n openldap-schema-pam_ldap
+if ! grep -q %{schemadir}/pam_ldap-ns.schema /etc/openldap/slapd.conf; then
+	sed -i -e '
+		/^include.*local.schema/{
+			i\
+include		%{schemadir}/pam_ldap-ns.schema
+		}
+	' /etc/openldap/slapd.conf
+fi
+if ! grep -q %{schemadir}/ns-pwd-policy.schema /etc/openldap/slapd.conf; then
+	sed -i -e '
+		/^include.*local.schema/{
+			i\
+include		%{schemadir}/ns-pwd-policy.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-pam_ldap
+if [ "$1" = "0" ]; then
+	if grep -q %{schemadir}/pam_ldap-ns.schema /etc/openldap/slapd.conf; then
+		sed -i -e '
+		/^include.*\/usr\/share\/openldap\/schema\/pam_ldap-ns.schema/d
+		' /etc/openldap/slapd.conf
+	fi
+
+	if grep -q %{schemadir}/ns-pwd-policy.schema /etc/openldap/slapd.conf; then
+		sed -i -e '
+		/^include.*\/usr\/share\/openldap\/schema\/ns-pwd-policy.schema/d
+		' /etc/openldap/slapd.conf
+	fi
+
+	if [ -f /var/lock/subsys/ldap ]; then
+		/etc/rc.d/init.d/ldap restart >&2 || :
+	fi
+f
 %files
 %defattr(644,root,root,755)
 %doc README ChangeLog ldap.conf pam.d
 %attr(755,root,root) %{_libdir}/security/pam_ldap.so
 %{_mandir}/man5/*
 
+%files -n openldap-schema-pam_ldap
+%defattr(644,root,root,755)
+%{schemadir}/*
+
 %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.25  2005/11/20 20:47:05  wiget
+- added openldap-schema-pam_ldap subpackage
+
 Revision 1.24  2005/09/02 19:19:29  qboosh
 - updated to 180 (fixes CAN-2005-2641; CAN-2005-2069 patch already in sources)
 - updated install patch
================================================================

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




More information about the pld-cvs-commit mailing list