3 # _without_pam - disable PAM support
4 # _with_ldap - enable LDAP support
5 # _with_mysql - enable MySQL support
6 # _with_pgsql - enable PostgreSQL support
7 # _with_quota - enable quota support
8 # _with_linuxprivs - enable libcap support
9 # _without_ipv6 - disable IPv6 and TCPD support
10 # _without_ssl - disbale TLS/SSL 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: 7c85503b160a36a96594ef75f3180a07
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 %{?_with_pgsql:BuildRequires: postgresql-devel}
46 %{?_with_ldap:BuildRequires: openldap-devel}
47 %{?!_without_ssl:BuildRequires: openssl-devel >= 0.9.7c}
48 %{?!_without_pam:BuildRequires: pam-devel}
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 %define _sysconfdir /etc/ftpd
52 %define _localstatedir /var/run
55 ProFTPD is a highly configurable ftp daemon for unix and unix-like
56 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
57 replacement for wu-ftpd. Full online documentation is available at
58 http://www.proftpd.org/, including a server configuration directive
62 ProFTPD es un servidor ftp altamente configurable para sistemas
63 operativos unix. Está proyectado para ser un substituto directo al
64 wu-ftpd. La documentación completa está disponible en
65 http://www.proftpd.org, incluido el manual de referencia para las
66 directivas de configuración del servidor.
69 ProFTPD jest wysoce konfigurowalnym serwerem ftp dla systemów Unix.
70 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
71 dokunentacja jest dostêpna on-line pod http://www.proftpd.org/
72 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
75 O ProFTPD é um servidor ftp altamente configurável para sistemas
78 É projetado para ser um substituto direto para o wu-ftpd. A
79 documentação completa está disponível em http://www.proftpd.org,
80 incluindo o manual de referência para as diretivas de configuração do
84 Summary: PROfessional FTP Daemon with apache-like configuration syntax - common files
85 Summary(pl): PROfesionalny serwer FTP - wspólne pliki
88 Requires(post): fileutils
90 %{?!_without_pam:Requires: pam >= 0.77.3}
91 Obsoletes: proftpd < 0:1.2.2rc1-3
94 ProFTPD is a highly configurable ftp daemon for unix and unix-like
95 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
96 replacement for wu-ftpd. Full online documentation is available at
97 http://www.proftpd.org/, including a server configuration directive
100 %description common -l pl
101 ProFTPD jest wysoce konfigurowalnym serwerem ftp dla systemów Unix.
102 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
103 dokunentacja jest dostêpna on-line pod http://www.proftpd.org/
104 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
107 Summary: inetd configs for proftpd
108 Summary(pl): Pliki konfiguracyjne do u¿ycia proftpd poprzez inetd
110 PreReq: %{name}-common = %{epoch}:%{version}
112 Requires(post): fileutils
115 Provides: proftpd = %{epoch}:%{version}-%{release}
117 Obsoletes: proftpd-standalone
122 Obsoletes: heimdal-ftpd
123 Obsoletes: linux-ftpd
124 Obsoletes: muddleftpd
126 Obsoletes: troll-ftpd
129 Conflicts: man-pages < 1.51
132 ProFTPD configs for running from inetd.
134 %description inetd -l pl
135 Pliki konfiguracyjna ProFTPD do startowania demona poprzez inetd.
138 Summary: Standalone daemon configs for proftpd
139 Summary(pl): Pliki konfiguracyjne do startowania proftpd w trybie standalone
141 PreReq: %{name}-common = %{epoch}:%{version}
143 Requires(post,preun): /sbin/chkconfig
144 Requires(post): fileutils
147 Provides: proftpd = %{epoch}:%{version}-%{release}
149 Obsoletes: proftpd-inetd
154 Obsoletes: heimdal-ftpd
155 Obsoletes: linux-ftpd
156 Obsoletes: muddleftpd
158 Obsoletes: troll-ftpd
161 Conflicts: man-pages < 1.51
163 %description standalone
164 ProFTPD configs for running as a standalone daemon.
166 %description standalone -l pl
167 Pliki konfiguracyjne ProFTPD do startowania demona w trybie
178 # IPv6 support needs major update
182 cp -f /usr/share/automake/config.sub .
184 RUN_DIR=%{_localstatedir} ; export RUN_DIR
186 --enable-autoshadow \
187 --with-modules=mod_ratio:mod_readme%{?!_without_ssl::mod_tls}%{?!_without_ipv6::mod_wrap}%{?!_without_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} \
188 %{?!_without_ipv6:--enable-ipv6} \
189 %{?_without_ssl:--disable-tls} \
195 rm -rf $RPM_BUILD_ROOT
197 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,security,sysconfig/rc-inetd,rc.d/init.d} \
198 $RPM_BUILD_ROOT/var/{lib/ftp/pub/Incoming,log}
200 %{__make} install DESTDIR=$RPM_BUILD_ROOT \
201 INSTALL_USER=`id -u` \
202 INSTALL_GROUP=`id -g`
204 rm -f $RPM_BUILD_ROOT%{_sbindir}/in.proftpd
206 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
207 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/ftpd
208 %{?!_without_pam:install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/ftp}
209 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/ftpd
210 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/proftpd
211 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/proftpd
212 install contrib/xferstats.holger-preiss $RPM_BUILD_ROOT%{_bindir}/xferstat
214 bzip2 -dc %{SOURCE7} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
216 mv -f contrib/README contrib/README.modules
218 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers.default
219 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers
220 :> $RPM_BUILD_ROOT/var/log/xferlog
222 ln -sf proftpd $RPM_BUILD_ROOT%{_sbindir}/ftpd
224 :> $RPM_BUILD_ROOT/etc/security/blacklist.ftp
227 rm -rf $RPM_BUILD_ROOT
231 touch /var/log/xferlog
232 awk 'BEGIN { FS = ":" }; { if(($3 < 500)&&($1 != "ftp")) print $1; }' < /etc/passwd >> %{_sysconfdir}/ftpusers.default
233 if [ ! -f %{_sysconfdir}/ftpusers ]; then
234 cp -f %{_sysconfdir}/ftpusers.default %{_sysconfdir}/ftpusers
239 if grep -iEqs "^ServerType[[:space:]]+standalone" %{_sysconfdir}/proftpd.conf ; then
240 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
241 sed -e "s/^ServerType[[:space:]]\+standalone/ServerType inetd/g" \
242 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
244 if [ -f /var/lock/subsys/rc-inetd ]; then
245 /etc/rc.d/init.d/rc-inetd reload 1>&2
247 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
251 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
252 /etc/rc.d/init.d/rc-inetd reload 1>&2
256 /sbin/chkconfig --add proftpd
257 if grep -iEqs "^ServerType[[:space:]]+inetd" %{_sysconfdir}/proftpd.conf ; then
258 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
259 sed -e "s/^ServerType[[:space:]]\+inetd/ServerType standalone/g" \
260 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
262 if [ -f /var/lock/subsys/proftpd ]; then
263 /etc/rc.d/init.d/proftpd restart 1>&2
265 echo "Run \"/etc/rc.d/init.d/proftpd start\" to start ProFTPD daemon."
269 if [ "$1" = "0" ]; then
270 if [ -f /var/lock/subsys/proftpd ]; then
271 /etc/rc.d/init.d/proftpd stop 1>&2
273 /sbin/chkconfig --del proftpd
277 %defattr(644,root,root,755)
278 %doc sample-configurations/*.conf CREDITS ChangeLog NEWS
279 %doc README README.LDAP README.PAM README.capabilities README.mod_sql README.modules
280 %doc doc/*html contrib/*.html
282 %attr(750,root,ftp) %dir %{_sysconfdir}
283 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
284 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/ftpusers
285 %attr(640,root,root) %{_sysconfdir}/ftpusers.default
286 %attr(640,root,root) /etc/logrotate.d/*
287 %attr(640,root,root) %ghost /var/log/*
288 %{?!_without_pam:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
290 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.ftp
292 %attr(755,root,root) %{_bindir}/*
293 %attr(755,root,root) %{_sbindir}/*
298 %dir /var/lib/ftp/pub
299 %attr(711,ftp,ftp) %dir /var/lib/ftp/pub/Incoming
302 %defattr(644,root,root,755)
303 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/ftpd
305 %lang(ja) %{_mandir}/ja/man5/ftpusers*
306 %lang(pl) %{_mandir}/pl/man5/ftpusers*
307 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
308 %lang(ru) %{_mandir}/ru/man5/ftpusers*
311 %defattr(644,root,root,755)
312 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/proftpd
313 %attr(754,root,root) /etc/rc.d/init.d/proftpd
315 %lang(ja) %{_mandir}/ja/man5/ftpusers*
316 %lang(pl) %{_mandir}/pl/man5/ftpusers*
317 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
318 %lang(ru) %{_mandir}/ru/man5/ftpusers*