SPECS: pure-ftpd.spec - define schemadir - register schema

shadzik shadzik at pld-linux.org
Sat Feb 17 14:40:15 CET 2007


Author: shadzik                      Date: Sat Feb 17 13:40:15 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- define schemadir
- register schema

---- Files affected:
SPECS:
   pure-ftpd.spec (1.160 -> 1.161) 

---- Diffs:

================================================================
Index: SPECS/pure-ftpd.spec
diff -u SPECS/pure-ftpd.spec:1.160 SPECS/pure-ftpd.spec:1.161
--- SPECS/pure-ftpd.spec:1.160	Sat Feb 17 14:34:23 2007
+++ SPECS/pure-ftpd.spec	Sat Feb 17 14:40:10 2007
@@ -68,6 +68,7 @@
 
 %define		_sysconfdir	/etc/ftpd
 %define		_ftpdir		/home/services/ftp
+%define		schemadir	/usr/share/openldap/schema
 
 %description
 Pure-FTPd is a fast, production-quality, standard-comformant FTP
@@ -152,7 +153,7 @@
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/etc/{pam.d,sysconfig,security,rc.d/init.d} \
-	$RPM_BUILD_ROOT{%{_sysconfdir}/vhosts,%{_ftpdir},%{_datadir}/openldap/schema}
+	$RPM_BUILD_ROOT{%{_sysconfdir}/vhosts,%{_ftpdir},%{schemadir}}
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
@@ -165,7 +166,7 @@
 %{?with_pgsql:install pureftpd-pgsql.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-pgsql.conf}
 install configuration-file/pure-ftpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd.conf
 %{!?with_extra:install configuration-file/pure-config.pl $RPM_BUILD_ROOT%{_sbindir}}
-install pureftpd.schema $RPM_BUILD_ROOT%{_datadir}/openldap/schema/pureftpd.schema
+install pureftpd.schema $RPM_BUILD_ROOT%{schemadir}/pureftpd.schema
 touch $RPM_BUILD_ROOT/etc/security/blacklist.ftp
 
 ln -s vhosts $RPM_BUILD_ROOT%{_sysconfdir}/pure-ftpd
@@ -191,6 +192,17 @@
 	/sbin/chkconfig --del %{name}
 fi
 
+%post -n openldap-schema-pureftpd
+%openldap_schema_register %{schemadir}/pureftpd.schema -d core
+%service -q ldap restart
+
+%postun -n openldap-schema-pureftpd
+if [ "$1" = "0" ]; then
+	%openldap_schema_unregister %{schemadir}/pureftpd.schema
+	%service -q ldap restart
+fi
+
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog CONTACT FAQ HISTORY NEWS README* THANKS pure*.conf pureftpd.schema
@@ -214,7 +226,7 @@
 %lang(ru) %{_mandir}/ru/man5/ftpusers*
 
 %files -n openldap-schema-pureftpd
-%defattr(644,root,root,755) %{_datadir}/openldap/schema/pureftpd.schema
+%defattr(644,root,root,755) %{schemadir}/pureftpd.schema
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -222,6 +234,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.161  2007/02/17 13:40:10  shadzik
+- define schemadir
+- register schema
+
 Revision 1.160  2007/02/17 13:34:23  shadzik
 - BR proper rpmbuild(macros) (>= 1.304)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/pure-ftpd.spec?r1=1.160&r2=1.161&f=u



More information about the pld-cvs-commit mailing list