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 BuildRequires: ncurses-devel
46 %{?_with_ldap:BuildRequires: openldap-devel}
47 %{?!_without_ssl:BuildRequires: openssl-devel >= 0.9.7c}
48 %{?!_without_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 %{?!_without_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}
113 Requires(post): fileutils
116 Provides: proftpd = %{epoch}:%{version}-%{release}
118 Obsoletes: proftpd-standalone
123 Obsoletes: heimdal-ftpd
124 Obsoletes: linux-ftpd
125 Obsoletes: muddleftpd
127 Obsoletes: troll-ftpd
130 Conflicts: man-pages < 1.51
133 ProFTPD configs for running from inetd.
135 %description inetd -l pl
136 Pliki konfiguracyjna ProFTPD do startowania demona poprzez inetd.
139 Summary: Standalone daemon configs for proftpd
140 Summary(pl): Pliki konfiguracyjne do startowania proftpd w trybie standalone
142 PreReq: %{name}-common = %{epoch}:%{version}
144 Requires(post,preun): /sbin/chkconfig
145 Requires(post): fileutils
148 Provides: proftpd = %{epoch}:%{version}-%{release}
150 Obsoletes: proftpd-inetd
155 Obsoletes: heimdal-ftpd
156 Obsoletes: linux-ftpd
157 Obsoletes: muddleftpd
159 Obsoletes: troll-ftpd
162 Conflicts: man-pages < 1.51
164 %description standalone
165 ProFTPD configs for running as a standalone daemon.
167 %description standalone -l pl
168 Pliki konfiguracyjne ProFTPD do startowania demona w trybie
179 # IPv6 support needs major update
183 cp -f /usr/share/automake/config.sub .
185 RUN_DIR=%{_localstatedir} ; export RUN_DIR
186 CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
187 CPPFLAGS="%{rpmcflags} -I/usr/include/ncurses"
189 --enable-autoshadow \
190 --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} \
191 %{?!_without_ipv6:--enable-ipv6} \
192 %{?_without_ssl:--disable-tls} \
198 rm -rf $RPM_BUILD_ROOT
200 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,security,sysconfig/rc-inetd,rc.d/init.d} \
201 $RPM_BUILD_ROOT/var/{lib/ftp/pub/Incoming,log}
203 %{__make} install DESTDIR=$RPM_BUILD_ROOT \
204 INSTALL_USER=`id -u` \
205 INSTALL_GROUP=`id -g`
207 rm -f $RPM_BUILD_ROOT%{_sbindir}/in.proftpd
209 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
210 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/ftpd
211 %{?!_without_pam:install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/ftp}
212 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/ftpd
213 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/proftpd
214 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/proftpd
215 install contrib/xferstats.holger-preiss $RPM_BUILD_ROOT%{_bindir}/xferstat
217 bzip2 -dc %{SOURCE7} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
219 mv -f contrib/README contrib/README.modules
221 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers.default
222 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers
223 :> $RPM_BUILD_ROOT/var/log/xferlog
225 ln -sf proftpd $RPM_BUILD_ROOT%{_sbindir}/ftpd
227 :> $RPM_BUILD_ROOT/etc/security/blacklist.ftp
230 rm -rf $RPM_BUILD_ROOT
234 touch /var/log/xferlog
235 awk 'BEGIN { FS = ":" }; { if(($3 < 500)&&($1 != "ftp")) print $1; }' < /etc/passwd >> %{_sysconfdir}/ftpusers.default
236 if [ ! -f %{_sysconfdir}/ftpusers ]; then
237 cp -f %{_sysconfdir}/ftpusers.default %{_sysconfdir}/ftpusers
242 if grep -iEqs "^ServerType[[:space:]]+standalone" %{_sysconfdir}/proftpd.conf ; then
243 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
244 sed -e "s/^ServerType[[:space:]]\+standalone/ServerType inetd/g" \
245 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
247 if [ -f /var/lock/subsys/rc-inetd ]; then
248 /etc/rc.d/init.d/rc-inetd reload 1>&2
250 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
254 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
255 /etc/rc.d/init.d/rc-inetd reload 1>&2
259 /sbin/chkconfig --add proftpd
260 if grep -iEqs "^ServerType[[:space:]]+inetd" %{_sysconfdir}/proftpd.conf ; then
261 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
262 sed -e "s/^ServerType[[:space:]]\+inetd/ServerType standalone/g" \
263 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
265 if [ -f /var/lock/subsys/proftpd ]; then
266 /etc/rc.d/init.d/proftpd restart 1>&2
268 echo "Run \"/etc/rc.d/init.d/proftpd start\" to start ProFTPD daemon."
272 if [ "$1" = "0" ]; then
273 if [ -f /var/lock/subsys/proftpd ]; then
274 /etc/rc.d/init.d/proftpd stop 1>&2
276 /sbin/chkconfig --del proftpd
280 %defattr(644,root,root,755)
281 %doc sample-configurations/*.conf CREDITS ChangeLog NEWS
282 %doc README README.LDAP README.PAM README.capabilities README.mod_sql README.modules
283 %doc doc/*html contrib/*.html
285 %attr(750,root,ftp) %dir %{_sysconfdir}
286 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
287 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/ftpusers
288 %attr(640,root,root) %{_sysconfdir}/ftpusers.default
289 %attr(640,root,root) /etc/logrotate.d/*
290 %attr(640,root,root) %ghost /var/log/*
291 %{?!_without_pam:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
293 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.ftp
295 %attr(755,root,root) %{_bindir}/*
296 %attr(755,root,root) %{_sbindir}/*
301 %dir /var/lib/ftp/pub
302 %attr(711,ftp,ftp) %dir /var/lib/ftp/pub/Incoming
305 %defattr(644,root,root,755)
306 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/ftpd
308 %lang(ja) %{_mandir}/ja/man5/ftpusers*
309 %lang(pl) %{_mandir}/pl/man5/ftpusers*
310 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
311 %lang(ru) %{_mandir}/ru/man5/ftpusers*
314 %defattr(644,root,root,755)
315 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/proftpd
316 %attr(754,root,root) /etc/rc.d/init.d/proftpd
318 %lang(ja) %{_mandir}/ja/man5/ftpusers*
319 %lang(pl) %{_mandir}/pl/man5/ftpusers*
320 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
321 %lang(ru) %{_mandir}/ru/man5/ftpusers*