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 dokunentacja 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
181 # IPv6 support needs major update
185 cp -f /usr/share/automake/config.sub .
187 RUN_DIR=%{_localstatedir} ; export RUN_DIR
188 CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
189 CPPFLAGS="%{rpmcflags} -I/usr/include/ncurses"
191 --enable-autoshadow \
192 --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} \
193 %{?with_ipv6:--enable-ipv6} \
194 %{!?with_ssl:--disable-tls} \
200 rm -rf $RPM_BUILD_ROOT
202 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,security,sysconfig/rc-inetd,rc.d/init.d} \
203 $RPM_BUILD_ROOT/var/{lib/ftp/pub/Incoming,log}
205 %{__make} install DESTDIR=$RPM_BUILD_ROOT \
206 INSTALL_USER=`id -u` \
207 INSTALL_GROUP=`id -g`
209 rm -f $RPM_BUILD_ROOT%{_sbindir}/in.proftpd
211 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
212 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/ftpd
213 %{?with_pam:install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/ftp}
214 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/ftpd
215 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/proftpd
216 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/proftpd
217 install contrib/xferstats.holger-preiss $RPM_BUILD_ROOT%{_bindir}/xferstat
219 bzip2 -dc %{SOURCE7} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
221 mv -f contrib/README contrib/README.modules
223 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers.default
224 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers
225 :> $RPM_BUILD_ROOT/var/log/xferlog
227 ln -sf proftpd $RPM_BUILD_ROOT%{_sbindir}/ftpd
229 :> $RPM_BUILD_ROOT/etc/security/blacklist.ftp
232 rm -rf $RPM_BUILD_ROOT
236 touch /var/log/xferlog
237 awk 'BEGIN { FS = ":" }; { if(($3 < 500)&&($1 != "ftp")) print $1; }' < /etc/passwd >> %{_sysconfdir}/ftpusers.default
238 if [ ! -f %{_sysconfdir}/ftpusers ]; then
239 cp -f %{_sysconfdir}/ftpusers.default %{_sysconfdir}/ftpusers
244 if grep -iEqs "^ServerType[[:space:]]+standalone" %{_sysconfdir}/proftpd.conf ; then
245 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
246 sed -e "s/^ServerType[[:space:]]\+standalone/ServerType inetd/g" \
247 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
249 if [ -f /var/lock/subsys/rc-inetd ]; then
250 /etc/rc.d/init.d/rc-inetd reload 1>&2
252 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
256 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
257 /etc/rc.d/init.d/rc-inetd reload 1>&2
261 /sbin/chkconfig --add proftpd
262 if grep -iEqs "^ServerType[[:space:]]+inetd" %{_sysconfdir}/proftpd.conf ; then
263 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
264 sed -e "s/^ServerType[[:space:]]\+inetd/ServerType standalone/g" \
265 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
267 if [ -f /var/lock/subsys/proftpd ]; then
268 /etc/rc.d/init.d/proftpd restart 1>&2
270 echo "Run \"/etc/rc.d/init.d/proftpd start\" to start ProFTPD daemon."
274 if [ "$1" = "0" ]; then
275 if [ -f /var/lock/subsys/proftpd ]; then
276 /etc/rc.d/init.d/proftpd stop 1>&2
278 /sbin/chkconfig --del proftpd
282 %defattr(644,root,root,755)
283 %doc sample-configurations/*.conf CREDITS ChangeLog NEWS
284 %doc README README.LDAP README.PAM README.capabilities README.modules
285 %doc doc/*html contrib/*.html
287 %attr(750,root,ftp) %dir %{_sysconfdir}
288 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
289 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/ftpusers
290 %attr(640,root,root) %{_sysconfdir}/ftpusers.default
291 %attr(640,root,root) /etc/logrotate.d/*
292 %attr(640,root,root) %ghost /var/log/*
293 %{?with_pam:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
295 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.ftp
297 %attr(755,root,root) %{_bindir}/*
298 %attr(755,root,root) %{_sbindir}/*
303 %dir /var/lib/ftp/pub
304 %attr(711,ftp,ftp) %dir /var/lib/ftp/pub/Incoming
307 %defattr(644,root,root,755)
308 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/ftpd
310 %lang(ja) %{_mandir}/ja/man5/ftpusers*
311 %lang(pl) %{_mandir}/pl/man5/ftpusers*
312 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
313 %lang(ru) %{_mandir}/ru/man5/ftpusers*
316 %defattr(644,root,root,755)
317 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/proftpd
318 %attr(754,root,root) /etc/rc.d/init.d/proftpd
320 %lang(ja) %{_mandir}/ja/man5/ftpusers*
321 %lang(pl) %{_mandir}/pl/man5/ftpusers*
322 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
323 %lang(ru) %{_mandir}/ru/man5/ftpusers*