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 URL: http://www.pureftpd.org/
19 BuildRequires: libcap-devel
20 %{?_with_mysql:BuildRequires: mysql-devel}
21 %{?_with_ldap:BuildRequires: openldap-devel}
22 BuildRequires: pam-devel
24 Requires(post,preun):/sbin/chkconfig
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 Obsoletes: heimdal-ftpd
35 Obsoletes: proftpd-common
36 Obsoletes: proftpd-inetd
37 Obsoletes: proftpd-standalone
41 Conflicts: man-pages < 1.51
43 %define _sysconfdir /etc/ftpd
46 Pure-FTPd is a fast, production-quality, standard-comformant FTP
47 server, based upon Troll-FTPd. Unlike other popular FTP servers, it
48 has no known security flaw, it is really trivial to set up and it is
49 especially designed for modern Linux kernels (setfsuid, sendfile,
50 capabilities) . Features include PAM support, IPv6, chroot()ed home
51 directories, virtual domains, built-in LS, anti-warez system, bounded
52 ports for passive downloads...
55 Pure-FTPD to szybki, wysokiej jako¶ci, odpowiadaj±cy standardom serwer
56 FTP bazuj±cy na Troll-FTPd. W przeciwieñstwie do innych serwerów FTP
57 nie ma znanych luk w bezpieczeñstwie. Ponadto jest trywialny w
58 konfiguracji i specjalnie zaprojektowany dla nowych kerneli Linuksa
59 (setfsuid, sendfile, capabilibies). Mo¿liwo¶ci to wsparcie dla PAMa,
60 IPv6, chroot()owanych katalogów domowych, virtualne domeny, wbudowany
61 LS, system anty-warezowy, ograniczanie portów dla pasywnych
65 %setup -q -n %{name}-%{version}
69 %{?_with_mysql:CPPFLAGS="-I%{_includedir}/mysql" --with-mysql} \
72 %{?!_with_mysql:--with-pam} \
81 --with-language=english \
82 --with-virtualchroot \
83 %{?_with_ldap:--with-ldap}
86 rm -rf $RPM_BUILD_ROOT
87 install -d $RPM_BUILD_ROOT/etc/{pam.d,sysconfig,security,rc.d/init.d} \
88 $RPM_BUILD_ROOT{%{_sysconfdir}/vhosts,/home/services/ftp/Incoming}
90 %{__make} install DESTDIR=$RPM_BUILD_ROOT
92 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
93 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
95 %{?_with_mysql:cat pureftpd-mysql.conf >> configuration-file/pure-ftpd.conf}
96 install configuration-file/pure-ftpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/pure-ftpd.conf
97 install configuration-file/pure-config.pl $RPM_BUILD_ROOT%{_sbindir}
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}/pure-ftpd.conf
130 %attr(740,root,root) %dir %{_sysconfdir}
131 %dir %{_sysconfdir}/vhosts
132 %dir /home/services/ftp
133 %attr(775,root,ftp) %dir /home/services/ftp/Incoming
135 %lang(ja) %{_mandir}/ja/man5/ftpusers*
136 %lang(pl) %{_mandir}/pl/man5/ftpusers*
137 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
138 %lang(ru) %{_mandir}/ru/man5/ftpusers*