Summary(pl.UTF-8): Mały, szybki i bezpieczny serwer FTP
Name: pure-ftpd
Version: 1.0.21
-Release: 4%{?with_extra:extra}
+Release: 5%{?with_extra:extra}
Epoch: 0
License: BSD-like%{?with_extra:, GLPv2 for pure-config due to libcfg+ license}
Group: Daemons
%{?with_tls:BuildRequires: openssl-devel}
BuildRequires: pam-devel
%{?with_pgsql:BuildRequires: postgresql-devel}
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rpmbuild(macros) >= 1.304
Requires(post,preun): /sbin/chkconfig
Requires: pam >= 0.79.0
%{!?with_extra:Requires: perl-base}
Obsoletes: ftpserver
Obsoletes: glftpd
Obsoletes: heimdal-ftpd
+Obsoletes: krb5-ftpd
Obsoletes: linux-ftpd
Obsoletes: muddleftpd
Obsoletes: proftpd
%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
%package -n openldap-schema-pureftpd
Summary: Pure-FTPd LDAP schema
-Summary(pl.UTF-8): Schemat LDAP Pure-FTPd'a
-Group: Netwroking/Daemons
+Summary(pl.UTF-8): Schemat LDAP dla Pure-FTPd
+Group: Networking/Daemons
Requires(post,postun): sed >= 4.0
Requires: openldap-servers
Requires: sed >= 4.0
%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
%{?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
-touch $RPM_BUILD_ROOT/etc/security/blacklist.ftp
+install pureftpd.schema $RPM_BUILD_ROOT%{schemadir}/pureftpd.schema
+
+touch $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers
ln -s vhosts $RPM_BUILD_ROOT%{_sysconfdir}/pure-ftpd
/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
+%doc AUTHORS ChangeLog CONTACT COPYING FAQ HISTORY NEWS README* THANKS pure*.conf pureftpd.schema
%attr(755,root,root) %{_bindir}/*
%attr(755,root,root) %{_sbindir}/*
%attr(754,root,root) /etc/rc.d/init.d/%{name}
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.ftp
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ftpusers
%{?with_ldap:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-ldap.conf}
%{?with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-mysql.conf}
%{?with_pgsql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-pgsql.conf}
%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