3 %bcond_without pam # disable PAM support
4 %bcond_without ipv6 # disable IPv6 and TCPD support
5 %bcond_without ssl # disbale TLS/SSL support
6 %bcond_with ldap # enable LDAP support
7 %bcond_with mysql # enable MySQL support
8 %bcond_with pgsql # enable PostgreSQL support
9 %bcond_with quota # enable quota support
10 %bcond_with linuxprivs # enable libcap support
12 Summary: PROfessional FTP Daemon with apache-like configuration syntax
13 Summary(es): Servidor FTP profesional, con sintaxis de configuración semejante a la del apache
14 Summary(pl): PROfesionalny serwer FTP
15 Summary(pt_BR): Servidor FTP profissional, com sintaxe de configuração semelhante à do apache
16 Summary(zh_CN): Ò×ÓÚ¹ÜÀíµÄ,°²È«µÄ FTP ·þÎñÆ÷
23 Source0: ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}.tar.bz2
24 # Source0-md5: 5feb4a7348e12faefc25e34fd92efdd6
26 Source2: %{name}.logrotate
28 Source4: %{name}.inetd
29 Source5: %{name}.sysconfig
31 Source7: ftpusers.tar.bz2
32 # Source7-md5: 76c80b6ec9f4d079a1e27316edddbe16
33 Patch0: %{name}-umode_t.patch
34 Patch1: %{name}-glibc.patch
35 Patch2: %{name}-paths.patch
36 Patch3: %{name}-noautopriv.patch
37 Patch4: %{name}-wtmp.patch
38 Patch5: %{name}-vmail.patch
39 Patch6: %{name}-IPv6.patch
40 URL: http://www.proftpd.org/
41 BuildRequires: autoconf
42 BuildRequires: automake
43 BuildRequires: libwrap-devel
44 %{?with_mysql:BuildRequires: mysql-devel}
45 BuildRequires: ncurses-devel
46 %{?with_ldap:BuildRequires: openldap-devel}
47 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
48 %{?with_pam:BuildRequires: pam-devel}
49 %{?with_pgsql:BuildRequires: postgresql-devel}
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 %define _sysconfdir /etc/ftpd
53 %define _localstatedir /var/run
56 ProFTPD is a highly configurable FTP daemon for unix and unix-like
57 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
58 replacement for wu-ftpd. Full online documentation is available at
59 http://www.proftpd.org/, including a server configuration directive
63 ProFTPD es un servidor FTP altamente configurable para sistemas
64 operativos unix. Está proyectado para ser un substituto directo al
65 wu-ftpd. La documentación completa está disponible en
66 http://www.proftpd.org, incluido el manual de referencia para las
67 directivas de configuración del servidor.
70 ProFTPD jest wysoce konfigurowalnym serwerem FTP dla systemów Unix.
71 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
72 dokumentacja jest dostêpna on-line pod http://www.proftpd.org/
73 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
76 O ProFTPD é um servidor FTP altamente configurável para sistemas
79 É projetado para ser um substituto direto para o wu-ftpd. A
80 documentação completa está disponível em http://www.proftpd.org,
81 incluindo o manual de referência para as diretivas de configuração do
85 Summary: PROfessional FTP Daemon with apache-like configuration syntax - common files
86 Summary(pl): PROfesionalny serwer FTP - wspólne pliki
89 Requires(post): fileutils
91 %{?with_pam:Requires: pam >= 0.77.3}
92 Obsoletes: proftpd < 0:1.2.2rc1-3
95 ProFTPD is a highly configurable FTP daemon for unix and unix-like
96 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
97 replacement for wu-ftpd. Full online documentation is available at
98 http://www.proftpd.org/, including a server configuration directive
101 %description common -l pl
102 ProFTPD jest wysoce konfigurowalnym serwerem FTP dla systemów Unix.
103 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
104 dokunentacja jest dostêpna on-line pod http://www.proftpd.org/
105 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
108 Summary: inetd configs for proftpd
109 Summary(pl): Pliki konfiguracyjne do u¿ycia proftpd poprzez inetd
111 PreReq: %{name}-common = %{epoch}:%{version}-%{release}
113 Requires(post): fileutils
116 Provides: proftpd = %{epoch}:%{version}-%{release}
118 Obsoletes: proftpd-standalone
124 Obsoletes: heimdal-ftpd
125 Obsoletes: linux-ftpd
126 Obsoletes: muddleftpd
128 Obsoletes: troll-ftpd
131 Conflicts: man-pages < 1.51
134 ProFTPD configs for running from inetd.
136 %description inetd -l pl
137 Pliki konfiguracyjna ProFTPD do startowania demona poprzez inetd.
140 Summary: Standalone daemon configs for proftpd
141 Summary(pl): Pliki konfiguracyjne do startowania proftpd w trybie standalone
143 PreReq: %{name}-common = %{epoch}:%{version}-%{release}
145 Requires(post,preun): /sbin/chkconfig
146 Requires(post): fileutils
149 Provides: proftpd = %{epoch}:%{version}-%{release}
151 Obsoletes: proftpd-inetd
157 Obsoletes: heimdal-ftpd
158 Obsoletes: linux-ftpd
159 Obsoletes: muddleftpd
161 Obsoletes: troll-ftpd
164 Conflicts: man-pages < 1.51
166 %description standalone
167 ProFTPD configs for running as a standalone daemon.
169 %description standalone -l pl
170 Pliki konfiguracyjne ProFTPD do startowania demona w trybie
174 %if %{with mysql} && %{with pgsql}
175 echo "Error: You can build at once --with mysql or --with pgsql"
186 # IPv6 support needs major update
190 cp -f /usr/share/automake/config.sub .
192 RUN_DIR=%{_localstatedir} ; export RUN_DIR
193 CFLAGS="%{rpmcflags} -I/usr/include/ncurses %{?with_mysql:-I/usr/include/mysql}"
194 CPPFLAGS="%{rpmcflags} -I/usr/include/ncurses %{?with_mysql:-I/usr/include/mysql}"
196 --enable-autoshadow \
197 --with-modules=mod_ratio:mod_readme%{?with_ssl::mod_tls}%{?with_ipv6::mod_wrap}%{?with_pam::mod_auth_pam}%{?with_ldap::mod_ldap}%{?with_quota::mod_quota}%{?with_linuxprivs::mod_linuxprivs}%{?with_mysql::mod_sql:mod_sql_mysql}%{?with_pgsql::mod_sql:mod_sql_postgres} \
198 %{?with_ipv6:--enable-ipv6} \
199 %{!?with_ssl:--disable-tls} \
205 rm -rf $RPM_BUILD_ROOT
206 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,security,sysconfig/rc-inetd,rc.d/init.d} \
207 $RPM_BUILD_ROOT/var/{lib/ftp/pub/Incoming,log}
210 DESTDIR=$RPM_BUILD_ROOT \
211 INSTALL_USER=`id -u` \
212 INSTALL_GROUP=`id -g`
214 rm -f $RPM_BUILD_ROOT%{_sbindir}/in.proftpd
216 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
217 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/ftpd
218 %{?with_pam:install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/ftp}
219 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/ftpd
220 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/proftpd
221 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/proftpd
222 install contrib/xferstats.holger-preiss $RPM_BUILD_ROOT%{_bindir}/xferstat
224 bzip2 -dc %{SOURCE7} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
226 mv -f contrib/README contrib/README.modules
228 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers.default
229 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers
230 :> $RPM_BUILD_ROOT/var/log/xferlog
232 ln -sf proftpd $RPM_BUILD_ROOT%{_sbindir}/ftpd
234 :> $RPM_BUILD_ROOT/etc/security/blacklist.ftp
237 rm -rf $RPM_BUILD_ROOT
241 touch /var/log/xferlog
242 awk 'BEGIN { FS = ":" }; { if(($3 < 500)&&($1 != "ftp")) print $1; }' < /etc/passwd >> %{_sysconfdir}/ftpusers.default
243 if [ ! -f %{_sysconfdir}/ftpusers ]; then
244 cp -f %{_sysconfdir}/ftpusers.default %{_sysconfdir}/ftpusers
249 if grep -iEqs "^ServerType[[:space:]]+standalone" %{_sysconfdir}/proftpd.conf ; then
250 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
251 sed -e "s/^ServerType[[:space:]]\+standalone/ServerType inetd/g" \
252 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
254 if [ -f /var/lock/subsys/rc-inetd ]; then
255 /etc/rc.d/init.d/rc-inetd reload 1>&2
257 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
261 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
262 /etc/rc.d/init.d/rc-inetd reload 1>&2
266 /sbin/chkconfig --add proftpd
267 if grep -iEqs "^ServerType[[:space:]]+inetd" %{_sysconfdir}/proftpd.conf ; then
268 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
269 sed -e "s/^ServerType[[:space:]]\+inetd/ServerType standalone/g" \
270 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
272 if [ -f /var/lock/subsys/proftpd ]; then
273 /etc/rc.d/init.d/proftpd restart 1>&2
275 echo "Run \"/etc/rc.d/init.d/proftpd start\" to start ProFTPD daemon."
279 if [ "$1" = "0" ]; then
280 if [ -f /var/lock/subsys/proftpd ]; then
281 /etc/rc.d/init.d/proftpd stop 1>&2
283 /sbin/chkconfig --del proftpd
286 %triggerpostun -- %{name}-inetd <= 1.2.10-1
287 echo "Changing deprecated config uptions"
288 cp /etc/ftpd/proftpd.conf /etc/ftpd/proftpd.conf.backup
289 sed -i -e 's/AuthPAMAuthoritative\b/AuthPAM/' /etc/ftpd/proftpd.conf
290 sed -i -e 's/TCPDServiceName/TCPServiceName/' /etc/ftpd/proftpd.conf
291 grep -v UseTCPD /etc/ftpd/proftpd.conf > /etc/ftpd/proftpd.conf.tmp
292 mv -f /etc/ftpd/proftpd.conf.tmp /etc/ftpd/proftpd.conf
293 chmod 640 /etc/ftpd/proftpd.conf
295 %triggerpostun -- %{name}-standalone <= 1.2.10-1
296 echo "Changing deprecated config uptions"
297 cp /etc/ftpd/proftpd.conf /etc/ftpd/proftpd.conf.backup
298 sed -i -e 's/AuthPAMAuthoritative\b/AuthPAM/' /etc/ftpd/proftpd.conf
299 sed -i -e 's/TCPDServiceName/TCPServiceName/' /etc/ftpd/proftpd.conf
300 grep -v UseTCPD /etc/ftpd/proftpd.conf > /etc/ftpd/proftpd.conf.tmp
301 mv -f /etc/ftpd/proftpd.conf.tmp /etc/ftpd/proftpd.conf
302 chmod 640 /etc/ftpd/proftpd.conf
305 %defattr(644,root,root,755)
306 %doc sample-configurations/*.conf CREDITS ChangeLog NEWS RELEASE_NOTES
307 %doc README README.LDAP README.PAM README.capabilities README.classes README.controls README.IPv6
309 %doc doc/*html contrib/*.html
311 %attr(750,root,ftp) %dir %{_sysconfdir}
312 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
313 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/ftpusers
314 %attr(640,root,root) %{_sysconfdir}/ftpusers.default
315 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/*
316 %attr(640,root,root) %ghost /var/log/*
317 %{?with_pam:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
319 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.ftp
321 %attr(755,root,root) %{_bindir}/*
322 %attr(755,root,root) %{_sbindir}/*
327 %dir /var/lib/ftp/pub
328 %attr(711,ftp,ftp) %dir /var/lib/ftp/pub/Incoming
331 %defattr(644,root,root,755)
332 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/ftpd
334 %lang(ja) %{_mandir}/ja/man5/ftpusers*
335 %lang(pl) %{_mandir}/pl/man5/ftpusers*
336 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
337 %lang(ru) %{_mandir}/ru/man5/ftpusers*
340 %defattr(644,root,root,755)
341 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/proftpd
342 %attr(754,root,root) /etc/rc.d/init.d/proftpd
344 %lang(ja) %{_mandir}/ja/man5/ftpusers*
345 %lang(pl) %{_mandir}/pl/man5/ftpusers*
346 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
347 %lang(ru) %{_mandir}/ru/man5/ftpusers*