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}
72 %{?!_with_mysql:--with-pam} \
81 --with-virtualchroot \
83 --with-peruserlimits \
84 %{?_with_mysql:CPPFLAGS="-I%{_includedir}/mysql" --with-mysql} \
85 %{?_with_ldap:--with-ldap} \
86 --with-language=english \
90 rm -rf $RPM_BUILD_ROOT
91 install -d $RPM_BUILD_ROOT/etc/{pam.d,sysconfig,security,rc.d/init.d} \
92 $RPM_BUILD_ROOT{%{_sysconfdir}/vhosts,/home/services/ftp/Incoming}
94 %{__make} install DESTDIR=$RPM_BUILD_ROOT
96 install %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/%{name}
97 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
99 %{?_with_mysql:install pureftpd-mysql.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd-mysql.conf}
100 install configuration-file/pure-ftpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/pureftpd.conf
101 install configuration-file/pure-config.pl $RPM_BUILD_ROOT%{_sbindir}
102 touch $RPM_BUILD_ROOT/etc/security/blacklist.ftp
104 ln -s vhosts $RPM_BUILD_ROOT%{_sysconfdir}/pure-ftpd
106 bzip2 -dc %{SOURCE3} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
109 rm -rf $RPM_BUILD_ROOT
112 /sbin/chkconfig --add %{name}
113 if [ -f %{_var}/lock/subsys/%{name} ]; then
114 /etc/rc.d/init.d/%{name} restart 1>&2
116 echo "Run \"/etc/rc.d/init.d/%{name} start\" to start PureFTPD daemon."
120 if [ "$1" = "0" ]; then
121 if [ -f %{_var}/lock/subsys/%{name} ]; then
122 /etc/rc.d/init.d/%{name} stop 1>&2
124 /sbin/chkconfig --del %{name}
128 %defattr(644,root,root,755)
129 %doc README* AUTHORS ChangeLog HISTORY NEWS THANKS pure*.conf
130 %attr(755,root,root) %{_bindir}/*
131 %attr(755,root,root) %{_sbindir}/*
132 %attr(754,root,root) /etc/rc.d/init.d/%{name}
133 %{?!_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
134 %{?!_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 size mtime) /etc/security/blacklist.ftp}
135 %{?_with_mysql:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd-mysql.conf}
136 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pureftpd.conf
137 %attr(710,root,ftp) %dir %{_sysconfdir}
138 %dir %{_sysconfdir}/vhosts
139 %dir %{_sysconfdir}/pure-ftpd
140 %dir /home/services/ftp
141 %attr(775,root,ftp) %dir /home/services/ftp/Incoming
143 %lang(ja) %{_mandir}/ja/man5/ftpusers*
144 %lang(pl) %{_mandir}/pl/man5/ftpusers*
145 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
146 %lang(ru) %{_mandir}/ru/man5/ftpusers*