3 # _with_mysql - enables MySQL auth but disables PAM auth
4 # _with_ldap - enabled LDAP auth
6 Summary: Small, fast and secure FTP server
7 Summary(pl): Ma³y, szybki i bezpieczny serwer FTP
14 Source0: ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/%{name}-%{version}.tar.bz2
17 Source3: ftpusers.tar.bz2
18 Patch0: %{name}-config.patch
19 URL: http://www.pureftpd.org/
20 BuildRequires: libcap-devel
21 %{?_with_mysql:BuildRequires: mysql-devel}
22 %{?_with_ldap:BuildRequires: openldap-devel}
23 BuildRequires: pam-devel
25 Requires(post,preun):/sbin/chkconfig
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 Obsoletes: heimdal-ftpd
36 Obsoletes: proftpd-common
37 Obsoletes: proftpd-inetd
38 Obsoletes: proftpd-standalone
42 Conflicts: man-pages < 1.51
44 %define _sysconfdir /etc/ftpd
47 Pure-FTPd is a fast, production-quality, standard-comformant FTP
48 server, based upon Troll-FTPd. Unlike other popular FTP servers, it
49 has no known security flaw, it is really trivial to set up and it is
50 especially designed for modern Linux kernels (setfsuid, sendfile,
51 capabilities) . Features include PAM support, IPv6, chroot()ed home
52 directories, virtual domains, built-in LS, anti-warez system, bounded
53 ports for passive downloads...
56 Pure-FTPD to szybki, wysokiej jako¶ci, odpowiadaj±cy standardom serwer
57 FTP bazuj±cy na Troll-FTPd. W przeciwieñstwie do innych serwerów FTP
58 nie ma znanych luk w bezpieczeñstwie. Ponadto jest trywialny w
59 konfiguracji i specjalnie zaprojektowany dla nowych kerneli Linuksa
60 (setfsuid, sendfile, capabilibies). Mo¿liwo¶ci to wsparcie dla PAMa,
61 IPv6, chroot()owanych katalogów domowych, virtualne domeny, wbudowany
62 LS, system anty-warezowy, ograniczanie portów dla pasywnych
71 %{?_with_mysql:CPPFLAGS="-I%{_includedir}/mysql" --with-mysql} \
74 %{?!_with_mysql:--with-pam} \
83 --with-language=english \
84 --with-virtualchroot \
85 %{?_with_ldap:--with-ldap}
88 rm -rf $RPM_BUILD_ROOT
89 install -d $RPM_BUILD_ROOT/etc/{pam.d,sysconfig,security,rc.d/init.d} \
90 $RPM_BUILD_ROOT{%{_sysconfdir}/vhosts},/home/ftp/Incoming}
92 %{__make} install DESTDIR=$RPM_BUILD_ROOT
94 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
95 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
96 install contrib/redhat.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd.conf
97 install pureftpd-mysql.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-mysql.conf
98 touch $RPM_BUILD_ROOT/etc/security/blacklist.ftp
100 bzip2 -dc %{SOURCE3} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
103 rm -rf $RPM_BUILD_ROOT
106 /sbin/chkconfig --add %{name}
107 if [ -f %{_var}/lock/subsys/%{name} ]; then
108 /etc/rc.d/init.d/%{name} restart 1>&2
110 echo "Run \"/etc/rc.d/init.d/%{name} start\" to start PureFTPD daemon."
114 if [ "$1" = "0" ]; then
115 if [ -f %{_var}/lock/subsys/%{name} ]; then
116 /etc/rc.d/init.d/%{name} stop 1>&2
118 /sbin/chkconfig --del %{name}
122 %defattr(644,root,root,755)
123 %doc README* AUTHORS ChangeLog HISTORY NEWS THANKS pure*.conf
124 %attr(755,root,root) %{_bindir}/*
125 %attr(755,root,root) %{_sbindir}/*
126 %attr(754,root,root) /etc/rc.d/init.d/%{name}
127 %{?!_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
128 %{?!_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/security/blacklist.ftp}
129 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd.conf
130 %{?_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-mysql.conf}
131 %attr(740,root,root) %dir %{_sysconfdir}
132 %dir %{_sysconfdir}/vhosts
134 %attr(775,root,ftp) %dir /home/ftp/Incoming
136 %lang(ja) %{_mandir}/ja/man5/ftpusers*
137 %lang(pl) %{_mandir}/pl/man5/ftpusers*
138 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
139 %lang(ru) %{_mandir}/ru/man5/ftpusers*