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 quotafile # enable quota file support
10 %bcond_with quotaldap # enable quota ldap support
11 %bcond_with quotamysql # enable quota mysql support
12 %bcond_with quotapgsql # enable quota pgsql support
13 %bcond_with linuxprivs # enable libcap support
15 Summary: PROfessional FTP Daemon with apache-like configuration syntax
16 Summary(es): Servidor FTP profesional, con sintaxis de configuración semejante a la del apache
17 Summary(pl): PROfesionalny serwer FTP
18 Summary(pt_BR): Servidor FTP profissional, com sintaxe de configuração semelhante à do apache
19 Summary(zh_CN): Ò×ÓÚ¹ÜÀíµÄ,°²È«µÄ FTP ·þÎñÆ÷
26 Source0: ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}.tar.bz2
27 # Source0-md5: 5feb4a7348e12faefc25e34fd92efdd6
29 Source2: %{name}.logrotate
31 Source4: %{name}.inetd
32 Source5: %{name}.sysconfig
34 Source7: ftpusers.tar.bz2
35 # Source7-md5: 76c80b6ec9f4d079a1e27316edddbe16
36 Patch0: %{name}-umode_t.patch
37 Patch1: %{name}-glibc.patch
38 Patch2: %{name}-paths.patch
39 Patch3: %{name}-noautopriv.patch
40 Patch4: %{name}-wtmp.patch
41 Patch5: %{name}-sendfile64.patch
42 URL: http://www.proftpd.org/
43 BuildRequires: autoconf
44 BuildRequires: automake
45 BuildRequires: libwrap-devel
46 %{?with_mysql:BuildRequires: mysql-devel}
47 %{?with_quotamysql:BuildRequires: mysql-devel}
48 BuildRequires: ncurses-devel
49 %{?with_ldap:BuildRequires: openldap-devel}
50 %{?with_quotaldap:BuildRequires: openldap-devel}
51 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
52 %{?with_pam:BuildRequires: pam-devel}
53 %{?with_pgsql:BuildRequires: postgresql-devel}
54 %{?with_quotapgsql:BuildRequires: postgresql-devel}
55 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 %define _sysconfdir /etc/ftpd
58 %define _localstatedir /var/run
61 ProFTPD is a highly configurable FTP daemon for unix and unix-like
62 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
63 replacement for wu-ftpd. Full online documentation is available at
64 http://www.proftpd.org/, including a server configuration directive
68 ProFTPD es un servidor FTP altamente configurable para sistemas
69 operativos unix. Está proyectado para ser un substituto directo al
70 wu-ftpd. La documentación completa está disponible en
71 http://www.proftpd.org, incluido el manual de referencia para las
72 directivas de configuración del servidor.
75 ProFTPD jest wysoce konfigurowalnym serwerem FTP dla systemów Unix.
76 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
77 dokumentacja jest dostêpna on-line pod http://www.proftpd.org/
78 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
81 O ProFTPD é um servidor FTP altamente configurável para sistemas
84 É projetado para ser um substituto direto para o wu-ftpd. A
85 documentação completa está disponível em http://www.proftpd.org,
86 incluindo o manual de referência para as diretivas de configuração do
90 Summary: PROfessional FTP Daemon with apache-like configuration syntax - common files
91 Summary(pl): PROfesionalny serwer FTP - wspólne pliki
94 Requires(post): fileutils
96 %{?with_pam:Requires: pam >= 0.77.3}
97 Obsoletes: proftpd < 0:1.2.2rc1-3
100 ProFTPD is a highly configurable FTP daemon for unix and unix-like
101 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
102 replacement for wu-ftpd. Full online documentation is available at
103 http://www.proftpd.org/, including a server configuration directive
106 %description common -l pl
107 ProFTPD jest wysoce konfigurowalnym serwerem FTP dla systemów Unix.
108 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
109 dokunentacja jest dostêpna on-line pod http://www.proftpd.org/
110 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
113 Summary: inetd configs for proftpd
114 Summary(pl): Pliki konfiguracyjne do u¿ycia proftpd poprzez inetd
116 PreReq: %{name}-common = %{epoch}:%{version}-%{release}
118 Requires(post): fileutils
121 Provides: proftpd = %{epoch}:%{version}-%{release}
123 Obsoletes: proftpd-standalone
129 Obsoletes: heimdal-ftpd
130 Obsoletes: linux-ftpd
131 Obsoletes: muddleftpd
133 Obsoletes: troll-ftpd
136 Conflicts: man-pages < 1.51
139 ProFTPD configs for running from inetd.
141 %description inetd -l pl
142 Pliki konfiguracyjna ProFTPD do startowania demona poprzez inetd.
145 Summary: Standalone daemon configs for proftpd
146 Summary(pl): Pliki konfiguracyjne do startowania proftpd w trybie standalone
148 PreReq: %{name}-common = %{epoch}:%{version}-%{release}
150 Requires(post,preun): /sbin/chkconfig
151 Requires(post): fileutils
154 Provides: proftpd = %{epoch}:%{version}-%{release}
156 Obsoletes: proftpd-inetd
162 Obsoletes: heimdal-ftpd
163 Obsoletes: linux-ftpd
164 Obsoletes: muddleftpd
166 Obsoletes: troll-ftpd
169 Conflicts: man-pages < 1.51
171 %description standalone
172 ProFTPD configs for running as a standalone daemon.
174 %description standalone -l pl
175 Pliki konfiguracyjne ProFTPD do startowania demona w trybie
179 %if %{with mysql} && %{with pgsql}
180 echo "Error: You can't build at once --with mysql and --with pgsql"
193 cp -f /usr/share/automake/config.sub .
195 RUN_DIR=%{_localstatedir} ; export RUN_DIR
196 CFLAGS="%{rpmcflags} -I/usr/include/ncurses %{?with_mysql:-I/usr/include/mysql}"
197 CPPFLAGS="%{rpmcflags} -I/usr/include/ncurses %{?with_mysql:-I/usr/include/mysql}"
199 --enable-autoshadow \
200 --with-modules=mod_ratio:mod_readme%{?with_ssl::mod_tls}%{?with_ipv6::mod_wrap}%{?with_pam::mod_auth_pam}%{?with_ldap::mod_ldap}%{?with_quotafile::mod_quotatab:mod_quotatab_file}%{?with_quotaldap::mod_quotatab:mod_quotatab_ldap}%{?with_quotamysql::mod_quotatab:mod_quotatab_sql}%{?with_quotapgsql:mod_quotatab:mod_quotatab_sql}%{?with_linuxprivs::mod_linuxprivs}%{?with_mysql::mod_sql:mod_sql_mysql}%{?with_pgsql::mod_sql:mod_sql_postgres} \
201 %{?with_ipv6:--enable-ipv6} \
202 %{!?with_ssl:--disable-tls} \
208 rm -rf $RPM_BUILD_ROOT
209 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,security,sysconfig/rc-inetd,rc.d/init.d} \
210 $RPM_BUILD_ROOT/var/{lib/ftp/pub/Incoming,log}
213 DESTDIR=$RPM_BUILD_ROOT \
214 INSTALL_USER=`id -u` \
215 INSTALL_GROUP=`id -g`
217 rm -f $RPM_BUILD_ROOT%{_sbindir}/in.proftpd
219 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
220 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/ftpd
221 %{?with_pam:install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/ftp}
222 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/ftpd
223 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/proftpd
224 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/proftpd
225 install contrib/xferstats.holger-preiss $RPM_BUILD_ROOT%{_bindir}/xferstat
227 bzip2 -dc %{SOURCE7} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
229 mv -f contrib/README contrib/README.modules
231 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers.default
232 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers
233 :> $RPM_BUILD_ROOT/var/log/xferlog
235 ln -sf proftpd $RPM_BUILD_ROOT%{_sbindir}/ftpd
237 :> $RPM_BUILD_ROOT/etc/security/blacklist.ftp
240 rm -rf $RPM_BUILD_ROOT
244 touch /var/log/xferlog
245 awk 'BEGIN { FS = ":" }; { if(($3 < 500)&&($1 != "ftp")) print $1; }' < /etc/passwd >> %{_sysconfdir}/ftpusers.default
246 if [ ! -f %{_sysconfdir}/ftpusers ]; then
247 cp -f %{_sysconfdir}/ftpusers.default %{_sysconfdir}/ftpusers
252 if grep -iEqs "^ServerType[[:space:]]+standalone" %{_sysconfdir}/proftpd.conf ; then
253 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
254 sed -e "s/^ServerType[[:space:]]\+standalone/ServerType inetd/g" \
255 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
257 if [ -f /var/lock/subsys/rc-inetd ]; then
258 /etc/rc.d/init.d/rc-inetd reload 1>&2
260 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
264 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
265 /etc/rc.d/init.d/rc-inetd reload 1>&2
269 /sbin/chkconfig --add proftpd
270 if grep -iEqs "^ServerType[[:space:]]+inetd" %{_sysconfdir}/proftpd.conf ; then
271 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
272 sed -e "s/^ServerType[[:space:]]\+inetd/ServerType standalone/g" \
273 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
275 if [ -f /var/lock/subsys/proftpd ]; then
276 /etc/rc.d/init.d/proftpd restart 1>&2
278 echo "Run \"/etc/rc.d/init.d/proftpd start\" to start ProFTPD daemon."
282 if [ "$1" = "0" ]; then
283 if [ -f /var/lock/subsys/proftpd ]; then
284 /etc/rc.d/init.d/proftpd stop 1>&2
286 /sbin/chkconfig --del proftpd
289 %triggerpostun -- %{name}-inetd <= 1.2.10-1
290 echo "Changing deprecated config uptions"
291 cp /etc/ftpd/proftpd.conf /etc/ftpd/proftpd.conf.backup
292 sed -i -e 's/AuthPAMAuthoritative\b/AuthPAM/' /etc/ftpd/proftpd.conf
293 sed -i -e 's/TCPDServiceName/TCPServiceName/' /etc/ftpd/proftpd.conf
294 grep -v UseTCPD /etc/ftpd/proftpd.conf > /etc/ftpd/proftpd.conf.tmp
295 mv -f /etc/ftpd/proftpd.conf.tmp /etc/ftpd/proftpd.conf
296 chmod 640 /etc/ftpd/proftpd.conf
298 %triggerpostun -- %{name}-standalone <= 1.2.10-1
299 echo "Changing deprecated config uptions"
300 cp /etc/ftpd/proftpd.conf /etc/ftpd/proftpd.conf.backup
301 sed -i -e 's/AuthPAMAuthoritative\b/AuthPAM/' /etc/ftpd/proftpd.conf
302 sed -i -e 's/TCPDServiceName/TCPServiceName/' /etc/ftpd/proftpd.conf
303 grep -v UseTCPD /etc/ftpd/proftpd.conf > /etc/ftpd/proftpd.conf.tmp
304 mv -f /etc/ftpd/proftpd.conf.tmp /etc/ftpd/proftpd.conf
305 chmod 640 /etc/ftpd/proftpd.conf
308 %defattr(644,root,root,755)
309 %doc sample-configurations/*.conf CREDITS ChangeLog NEWS RELEASE_NOTES
310 %doc README README.LDAP README.PAM README.capabilities README.classes README.controls README.IPv6
312 %doc doc/*html contrib/*.html
314 %attr(750,root,ftp) %dir %{_sysconfdir}
315 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
316 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/ftpusers
317 %attr(640,root,root) %{_sysconfdir}/ftpusers.default
318 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/*
319 %attr(640,root,root) %ghost /var/log/*
320 %{?with_pam:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
322 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.ftp
324 %attr(755,root,root) %{_bindir}/*
325 %attr(755,root,root) %{_sbindir}/*
330 %dir /var/lib/ftp/pub
331 %attr(711,ftp,ftp) %dir /var/lib/ftp/pub/Incoming
334 %defattr(644,root,root,755)
335 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/ftpd
337 %lang(ja) %{_mandir}/ja/man5/ftpusers*
338 %lang(pl) %{_mandir}/pl/man5/ftpusers*
339 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
340 %lang(ru) %{_mandir}/ru/man5/ftpusers*
343 %defattr(644,root,root,755)
344 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/proftpd
345 %attr(754,root,root) /etc/rc.d/init.d/proftpd
347 %lang(ja) %{_mandir}/ja/man5/ftpusers*
348 %lang(pl) %{_mandir}/pl/man5/ftpusers*
349 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
350 %lang(ru) %{_mandir}/ru/man5/ftpusers*