3 %bcond_without ldap # disable LDAP auth
4 %bcond_without mysql # disable MySQL auth but disables PAM auth
5 %bcond_without pgsql # disable PostgreSQL support
6 %bcond_without puredb # disable pure-db support
7 %bcond_without tls # support SSL/TLS
9 Summary: Small, fast and secure FTP server
10 Summary(pl): Ma³y, szybki i bezpieczny serwer FTP
17 Source0: ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/%{name}-%{version}.tar.bz2
18 # Source0-md5: 56925bb7a35b07ca70e5453af731acba
21 Source3: ftpusers.tar.bz2
22 # Source3-md5: 76c80b6ec9f4d079a1e27316edddbe16
23 Patch0: %{name}-config.patch
24 URL: http://www.pureftpd.org/
25 BuildRequires: libcap-devel
26 %{?with_ldap:BuildRequires: openldap-devel}
27 %{?with_mysql:BuildRequires: mysql-devel}
28 %{?with_pgsql:BuildRequires: postgresql-devel}
29 %{?with_tls:BuildRequires: openssl-devel}
30 BuildRequires: pam-devel
32 Requires(post,preun):/sbin/chkconfig
33 Requires: pam >= 0.77.3
41 Obsoletes: heimdal-ftpd
45 Obsoletes: proftpd-common
46 Obsoletes: proftpd-inetd
47 Obsoletes: proftpd-standalone
51 Conflicts: man-pages < 1.51
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 %define _sysconfdir /etc/ftpd
55 %define _ftpdir /home/services/ftp
58 Pure-FTPd is a fast, production-quality, standard-comformant FTP
59 server, based upon Troll-FTPd. Unlike other popular FTP servers, it
60 has no known security flaw, it is really trivial to set up and it is
61 especially designed for modern Linux kernels (setfsuid, sendfile,
62 capabilities) . Features include PAM support, IPv6, chroot()ed home
63 directories, virtual domains, built-in LS, anti-warez system, bounded
64 ports for passive downloads...
67 Pure-FTPD to szybki, wysokiej jako¶ci, odpowiadaj±cy standardom serwer
68 FTP bazuj±cy na Troll-FTPd. W przeciwieñstwie do innych serwerów FTP
69 nie ma znanych luk w bezpieczeñstwie. Ponadto jest trywialny w
70 konfiguracji i specjalnie zaprojektowany dla nowych kerneli Linuksa
71 (setfsuid, sendfile, capabilibies). Mo¿liwo¶ci to wsparcie dla PAMa,
72 IPv6, chroot()owanych katalogów domowych, virtualne domeny, wbudowany
73 LS, system anty-warezowy, ograniczanie portów dla pasywnych
87 --with-language=english \
89 %{?with_ldap:--with-ldap} \
90 %{?with_mysql:CPPFLAGS="-I%{_includedir}/mysql" --with-mysql} \
92 --with-peruserlimits \
93 %{?with_pgsql:--with-pgsql} \
95 %{?with_puredb:--with-puredb} \
99 %{?with_tls:--with-tls --with-certfile=%{_sharedstatedir}/openssl/certs/ftpd.pem} \
100 --with-uploadscript \
101 --with-virtualchroot \
105 rm -rf $RPM_BUILD_ROOT
106 install -d $RPM_BUILD_ROOT/etc/{pam.d,sysconfig,security,rc.d/init.d} \
107 $RPM_BUILD_ROOT{%{_sysconfdir}/vhosts,%{_ftpdir}/Incoming}
110 DESTDIR=$RPM_BUILD_ROOT
112 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
113 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
115 %{?with_ldap:install pureftpd-ldap.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-ldap.conf}
116 %{?with_mysql:install pureftpd-mysql.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-mysql.conf}
117 %{?with_pgsql:install pureftpd-pgsql.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-pgsql.conf}
118 install configuration-file/pure-ftpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd.conf
119 install configuration-file/pure-config.pl $RPM_BUILD_ROOT%{_sbindir}
120 touch $RPM_BUILD_ROOT/etc/security/blacklist.ftp
122 ln -s vhosts $RPM_BUILD_ROOT%{_sysconfdir}/pure-ftpd
124 bzip2 -dc %{SOURCE3} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
127 rm -rf $RPM_BUILD_ROOT
130 /sbin/chkconfig --add %{name}
131 if [ -f %{_var}/lock/subsys/%{name} ]; then
132 /etc/rc.d/init.d/%{name} restart 1>&2
134 echo "Run \"/etc/rc.d/init.d/%{name} start\" to start PureFTPD daemon."
138 if [ "$1" = "0" ]; then
139 if [ -f %{_var}/lock/subsys/%{name} ]; then
140 /etc/rc.d/init.d/%{name} stop 1>&2
142 /sbin/chkconfig --del %{name}
146 %defattr(644,root,root,755)
147 %doc README* AUTHORS ChangeLog HISTORY NEWS THANKS pure*.conf
148 %attr(755,root,root) %{_bindir}/*
149 %attr(755,root,root) %{_sbindir}/*
150 %attr(754,root,root) /etc/rc.d/init.d/%{name}
151 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*
152 %attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/security/blacklist.ftp
153 %{?with_ldap:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-ldap.conf}
154 %{?with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-mysql.conf}
155 %{?with_pgsql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-pgsql.conf}
156 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd.conf
157 %attr(710,root,ftp) %dir %{_sysconfdir}
158 %dir %{_sysconfdir}/vhosts
159 %dir %{_sysconfdir}/pure-ftpd
161 %attr(775,root,ftp) %dir %{_ftpdir}/Incoming
163 %lang(ja) %{_mandir}/ja/man5/ftpusers*
164 %lang(pl) %{_mandir}/pl/man5/ftpusers*
165 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
166 %lang(ru) %{_mandir}/ru/man5/ftpusers*