1 # _with_mysql - enables MySQL auth but disables PAM auth
2 Summary: Small, fast and secure FTP server
3 Summary(pl): Ma³y, szybki i bezpieczny serwer FTP
11 Source0: http://prdownloads.sourceforge.net/pureftpd/%{name}-%{version}.tar.gz
14 Patch0: %{name}-config.patch
15 URL: http://www.pureftpd.org/
16 %{?_with_mysql:BuildRequires: mysql-devel}
17 BuildRequires: libcap-devel
18 BuildRequires: pam-devel
19 BuildRequires: automake
20 BuildRequires: autoconf
22 Prereq: /sbin/chkconfig
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Obsoletes: heimdal-ftpd
37 Pure-FTPd is a fast, production-quality, standard-comformant FTP
38 server, based upon Troll-FTPd. Unlike other popular FTP servers, it
39 has no known security flaw, it is really trivial to set up and it is
40 especially designed for modern Linux kernels (setfsuid, sendfile,
41 capabilities) . Features include PAM support, IPv6, chroot()ed home
42 directories, virtual domains, built-in LS, anti-warez system, bounded
43 ports for passive downloads...
46 Pure-FTPD to szybki, wysokiej jako¶ci, odpowiadaj±cy standardom serwer
47 FTP bazuj±cy na Troll-FTPd. W przeciwieñstwie do innych serwerów FTP
48 nie ma znanych luk w bezpieczeñstwie. Ponadto jest trywialny w
49 konfiguracji i specjalnie zaprojektowany dla nowych kerneli Linuxa
50 (setfsuid, sendfile, capabilibies). Mo¿liwo¶ci to wsparcie dla PAMa,
51 IPv6, chroot()owanych katalogów domowych, virtualne domeny, wbudowany
52 LS, system anty-warezowy, ograniczanie portów dla pasywnych
64 %{?_with_mysql:CPPFLAGS="-I%{_includedir}/mysql" --with-mysql} \
67 %{?!_with_mysql:--with-pam} \
75 --with-language=english
78 rm -rf $RPM_BUILD_ROOT
79 install -d $RPM_BUILD_ROOT/etc/{pam.d,sysconfig,ftpd/vhosts,security,rc.d/init.d} \
80 $RPM_BUILD_ROOT/home/ftp/Incoming
82 %{__make} install DESTDIR=$RPM_BUILD_ROOT
84 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
85 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
86 install contrib/redhat.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/ftpd/pureftpd.conf
87 install pureftpd-mysql.conf $RPM_BUILD_ROOT%{_sysconfdir}/ftpd/pureftpd-mysql.conf
88 touch $RPM_BUILD_ROOT/etc/security/blacklist.ftp
90 gzip -9nf README* AUTHORS ChangeLog HISTORY NEWS THANKS
93 rm -rf $RPM_BUILD_ROOT
96 /sbin/chkconfig --add %{name}
97 if [ -f %{_var}/lock/subsys/%{name} ]; then
98 /etc/rc.d/init.d/%{name} restart 1>&2
100 echo "Run \"/etc/rc.d/init.d/%{name} start\" to start PureFTPD daemon."
104 if [ "$1" = "0" ]; then
105 if [ -f %{_var}/lock/subsys/%{name} ]; then
106 /etc/rc.d/init.d/%{name} stop 1>&2
108 /sbin/chkconfig --del %{name}
112 %defattr(644,root,root,755)
114 %attr(755,root,root) %{_bindir}/*
115 %attr(755,root,root) %{_sbindir}/*
116 %attr(640,root,root) %dir /etc/ftpd
117 %dir %{_sysconfdir}/ftpd/vhosts
118 %attr(754,root,root) /etc/rc.d/init.d/%{name}
119 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ftpd/pureftpd.conf
120 %{?_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ftpd/pureftpd-mysql.conf}
121 %{?!_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
122 %{?!_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/security/blacklist.ftp}
124 %attr(775,root,ftp) %dir /home/ftp/Incoming