2 # - why main and -common package descriptions are same?
5 %bcond_without pam # disable PAM support
6 %bcond_without ipv6 # disable IPv6 and TCPD support
7 %bcond_without ssl # disbale TLS/SSL support
8 %bcond_with ldap # enable LDAP support
9 %bcond_with mysql # enable MySQL support
10 %bcond_with pgsql # enable PostgreSQL support
11 %bcond_with quotafile # enable quota file support
12 %bcond_with quotaldap # enable quota ldap support
13 %bcond_with quotamysql # enable quota mysql support
14 %bcond_with quotapgsql # enable quota pgsql support
15 %bcond_with linuxprivs # enable libcap support
17 Summary: PROfessional FTP Daemon with apache-like configuration syntax
18 Summary(es): Servidor FTP profesional, con sintaxis de configuración semejante a la del apache
19 Summary(pl): PROfesionalny serwer FTP
20 Summary(pt_BR): Servidor FTP profissional, com sintaxe de configuração semelhante à do apache
21 Summary(zh_CN): Ò×ÓÚ¹ÜÀíµÄ,°²È«µÄ FTP ·þÎñÆ÷
28 Source0: ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}.tar.bz2
29 # Source0-md5: 5feb4a7348e12faefc25e34fd92efdd6
31 Source2: %{name}.logrotate
33 Source4: %{name}.inetd
34 Source5: %{name}.sysconfig
36 Source7: ftpusers.tar.bz2
37 # Source7-md5: 76c80b6ec9f4d079a1e27316edddbe16
38 Source8: http://www.castaglia.org/proftpd/modules/proftpd-mod-shaper-0.5.5.tar.gz
39 # Source8-md5: ca3d63ffbc6ad5b6a9063f79b36d1b55
40 Patch0: %{name}-umode_t.patch
41 Patch1: %{name}-glibc.patch
42 Patch2: %{name}-paths.patch
43 Patch3: %{name}-noautopriv.patch
44 Patch4: %{name}-wtmp.patch
45 Patch5: %{name}-sendfile64.patch
46 Patch6: %{name}-CAN-2005-2390.patch
47 URL: http://www.proftpd.org/
48 BuildRequires: autoconf
49 BuildRequires: automake
50 BuildRequires: libwrap-devel
51 %{?with_mysql:BuildRequires: mysql-devel}
52 %{?with_quotamysql:BuildRequires: mysql-devel}
53 BuildRequires: ncurses-devel
54 %{?with_ldap:BuildRequires: openldap-devel}
55 %{?with_quotaldap:BuildRequires: openldap-devel}
56 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
57 %{?with_pam:BuildRequires: pam-devel}
58 %{?with_pgsql:BuildRequires: postgresql-devel}
59 %{?with_quotapgsql:BuildRequires: postgresql-devel}
60 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 %define _sysconfdir /etc/ftpd
63 %define _localstatedir /var/run
66 ProFTPD is a highly configurable FTP daemon for unix and unix-like
67 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
68 replacement for wu-ftpd. Full online documentation is available at
69 <http://www.proftpd.org/>, including a server configuration directive
72 This package also includes mod_shaper module from
73 <http://www.castaglia.org/proftpd/>
76 ProFTPD es un servidor FTP altamente configurable para sistemas
77 operativos unix. Está proyectado para ser un substituto directo al
78 wu-ftpd. La documentación completa está disponible en
79 <http://www.proftpd.org/>, incluido el manual de referencia para las
80 directivas de configuración del servidor.
83 ProFTPD jest wysoce konfigurowalnym serwerem FTP dla systemów Unix.
84 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
85 dokumentacja jest dostêpna on-line pod <http://www.proftpd.org/>
86 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
89 O ProFTPD é um servidor FTP altamente configurável para sistemas
92 É projetado para ser um substituto direto para o wu-ftpd. A
93 documentação completa está disponível em <http://www.proftpd.org/>,
94 incluindo o manual de referência para as diretivas de configuração do
98 Summary: PROfessional FTP Daemon with apache-like configuration syntax - common files
99 Summary(pl): PROfesionalny serwer FTP - wspólne pliki
102 Requires(post): fileutils
104 %{?with_pam:Requires: pam >= 0.79.0}
105 Obsoletes: proftpd < 0:1.2.2rc1-3
108 ProFTPD is a highly configurable FTP daemon for unix and unix-like
109 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
110 replacement for wu-ftpd. Full online documentation is available at
111 <http://www.proftpd.org/>, including a server configuration directive
114 %description common -l pl
115 ProFTPD jest wysoce konfigurowalnym serwerem FTP dla systemów Unix.
116 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
117 dokunentacja jest dostêpna on-line pod http://www.proftpd.org/
118 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
121 Summary: inetd configs for proftpd
122 Summary(pl): Pliki konfiguracyjne do u¿ycia proftpd poprzez inetd
124 PreReq: %{name}-common = %{epoch}:%{version}-%{release}
126 Requires(post): fileutils
129 Provides: proftpd = %{epoch}:%{version}-%{release}
131 Obsoletes: proftpd-standalone
137 Obsoletes: heimdal-ftpd
138 Obsoletes: linux-ftpd
139 Obsoletes: muddleftpd
141 Obsoletes: troll-ftpd
144 Conflicts: man-pages < 1.51
147 ProFTPD configs for running from inetd.
149 %description inetd -l pl
150 Pliki konfiguracyjna ProFTPD do startowania demona poprzez inetd.
153 Summary: Standalone daemon configs for proftpd
154 Summary(pl): Pliki konfiguracyjne do startowania proftpd w trybie standalone
156 PreReq: %{name}-common = %{epoch}:%{version}-%{release}
158 Requires(post,preun): /sbin/chkconfig
159 Requires(post): fileutils
162 Provides: proftpd = %{epoch}:%{version}-%{release}
164 Obsoletes: proftpd-inetd
170 Obsoletes: heimdal-ftpd
171 Obsoletes: linux-ftpd
172 Obsoletes: muddleftpd
174 Obsoletes: troll-ftpd
177 Conflicts: man-pages < 1.51
179 %description standalone
180 ProFTPD configs for running as a standalone daemon.
182 %description standalone -l pl
183 Pliki konfiguracyjne ProFTPD do startowania demona w trybie
187 %if %{with mysql} && %{with pgsql}
188 echo "Error: You can't build at once --with mysql and --with pgsql"
200 # move mod_shaper code on to the source tree
201 mv mod_shaper/mod_shaper.c contrib/
204 cp -f /usr/share/automake/config.sub .
206 RUN_DIR=%{_localstatedir} ; export RUN_DIR
207 CFLAGS="%{rpmcflags} -I/usr/include/ncurses %{?with_mysql:-I/usr/include/mysql}"
208 CPPFLAGS="%{rpmcflags} -I/usr/include/ncurses %{?with_mysql:-I/usr/include/mysql}"
215 %{?with_ipv6:mod_wrap}
216 %{?with_pam:mod_auth_pam}
217 %{?with_ldap:mod_ldap}
218 %{?with_quotafile:mod_quotatab mod_quotatab_file}
219 %{?with_quotaldap:mod_quotatab mod_quotatab_ldap}
220 %{?with_quotamysql:mod_quotatab mod_quotatab_sql}
221 %{?with_quotapgsql:mod_quotatab mod_quotatab_sql}
222 %{?with_linuxprivs:mod_linuxprivs}
223 %{?with_mysql:mod_sql mod_sql_mysql}
224 %{?with_pgsql:mod_sql mod_sql_postgres}
228 --enable-autoshadow \
229 --with-modules=$(echo $MODULES | tr ' ' ':') \
230 %{?with_ipv6:--enable-ipv6} \
231 %{!?with_ssl:--disable-tls} \
238 rm -rf $RPM_BUILD_ROOT
239 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,security,sysconfig/rc-inetd,rc.d/init.d} \
240 $RPM_BUILD_ROOT/var/{lib/ftp/pub/Incoming,log}
243 DESTDIR=$RPM_BUILD_ROOT \
244 INSTALL_USER=%(id -u) \
245 INSTALL_GROUP=%(id -g)
247 rm -f $RPM_BUILD_ROOT%{_sbindir}/in.proftpd
249 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
250 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/ftpd
251 %{?with_pam:install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/ftp}
252 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/ftpd
253 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/proftpd
254 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/proftpd
255 install contrib/xferstats.holger-preiss $RPM_BUILD_ROOT%{_bindir}/xferstat
257 bzip2 -dc %{SOURCE7} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
259 mv -f contrib/README contrib/README.modules
261 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers.default
262 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers
263 :> $RPM_BUILD_ROOT/var/log/xferlog
265 ln -sf proftpd $RPM_BUILD_ROOT%{_sbindir}/ftpd
267 :> $RPM_BUILD_ROOT/etc/security/blacklist.ftp
270 rm -rf $RPM_BUILD_ROOT
274 touch /var/log/xferlog
275 awk 'BEGIN { FS = ":" }; { if(($3 < 500)&&($1 != "ftp")) print $1; }' < /etc/passwd >> %{_sysconfdir}/ftpusers.default
276 if [ ! -f %{_sysconfdir}/ftpusers ]; then
277 cp -f %{_sysconfdir}/ftpusers.default %{_sysconfdir}/ftpusers
282 if grep -iEqs "^ServerType[[:space:]]+standalone" %{_sysconfdir}/proftpd.conf ; then
283 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
284 sed -e "s/^ServerType[[:space:]]\+standalone/ServerType inetd/g" \
285 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
287 if [ -f /var/lock/subsys/rc-inetd ]; then
288 /etc/rc.d/init.d/rc-inetd reload 1>&2
290 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
294 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
295 /etc/rc.d/init.d/rc-inetd reload 1>&2
299 /sbin/chkconfig --add proftpd
300 if grep -iEqs "^ServerType[[:space:]]+inetd" %{_sysconfdir}/proftpd.conf ; then
301 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
302 sed -e "s/^ServerType[[:space:]]\+inetd/ServerType standalone/g" \
303 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
305 if [ -f /var/lock/subsys/proftpd ]; then
306 /etc/rc.d/init.d/proftpd restart 1>&2
308 echo "Run \"/etc/rc.d/init.d/proftpd start\" to start ProFTPD daemon."
312 if [ "$1" = "0" ]; then
313 if [ -f /var/lock/subsys/proftpd ]; then
314 /etc/rc.d/init.d/proftpd stop 1>&2
316 /sbin/chkconfig --del proftpd
319 %triggerpostun inetd -- %{name}-inetd <= 1.2.10-1
320 echo "Changing deprecated config options"
321 cp /etc/ftpd/proftpd.conf /etc/ftpd/proftpd.conf.backup
322 sed -i -e 's/AuthPAMAuthoritative\b/AuthPAM/' /etc/ftpd/proftpd.conf
323 sed -i -e 's/TCPDServiceName/TCPServiceName/' /etc/ftpd/proftpd.conf
324 sed -i -e 's/TlsRsaCertFile/TLSRSACertificateFile/' /etc/ftpd/proftpd.conf
325 sed -i -e 's/TlsRsaKeyFile/TLSRSACertificateKeyFile/' /etc/ftpd/proftpd.conf
326 sed -i -e 's/TlsDsaCertFile/TLSDSACertificateFile/' /etc/ftpd/proftpd.conf
327 sed -i -e 's/TlsDsaKeyFile/TLSDSACertificateKeyFile/' /etc/ftpd/proftpd.conf
328 sed -i -e 's/TlsCrlFile/TLSCARevocationFile/' /etc/ftpd/proftpd.conf
329 sed -i -e 's/TlsDhParamFile/TLSDHParamFile/' /etc/ftpd/proftpd.conf
330 sed -i -e 's/TlsCipherList/TLSCipherSuite/' /etc/ftpd/proftpd.conf
331 sed -i -e 's/TlsCertsOk/TLSVerifyClient/' /etc/ftpd/proftpd.conf
332 grep -v UseTCPD /etc/ftpd/proftpd.conf > /etc/ftpd/proftpd.conf.tmp
333 mv -f /etc/ftpd/proftpd.conf.tmp /etc/ftpd/proftpd.conf
334 chmod 640 /etc/ftpd/proftpd.conf
336 %triggerpostun standalone -- %{name}-standalone <= 1.2.10-1
337 echo "Changing deprecated config options"
338 cp /etc/ftpd/proftpd.conf /etc/ftpd/proftpd.conf.backup
339 sed -i -e 's/AuthPAMAuthoritative\b/AuthPAM/' /etc/ftpd/proftpd.conf
340 sed -i -e 's/TCPDServiceName/TCPServiceName/' /etc/ftpd/proftpd.conf
341 sed -i -e 's/TlsRsaCertFile/TLSRSACertificateFile/' /etc/ftpd/proftpd.conf
342 sed -i -e 's/TlsRsaKeyFile/TLSRSACertificateKeyFile/' /etc/ftpd/proftpd.conf
343 sed -i -e 's/TlsDsaCertFile/TLSDSACertificateFile/' /etc/ftpd/proftpd.conf
344 sed -i -e 's/TlsDsaKeyFile/TLSDSACertificateKeyFile/' /etc/ftpd/proftpd.conf
345 sed -i -e 's/TlsCrlFile/TLSCARevocationFile/' /etc/ftpd/proftpd.conf
346 sed -i -e 's/TlsDhParamFile/TLSDHParamFile/' /etc/ftpd/proftpd.conf
347 sed -i -e 's/TlsCipherList/TLSCipherSuite/' /etc/ftpd/proftpd.conf
348 sed -i -e 's/TlsCertsOk/TLSVerifyClient/' /etc/ftpd/proftpd.conf
349 grep -v UseTCPD /etc/ftpd/proftpd.conf > /etc/ftpd/proftpd.conf.tmp
350 mv -f /etc/ftpd/proftpd.conf.tmp /etc/ftpd/proftpd.conf
351 chmod 640 /etc/ftpd/proftpd.conf
354 %defattr(644,root,root,755)
355 %doc sample-configurations/*.conf CREDITS ChangeLog NEWS RELEASE_NOTES
356 %doc README README.LDAP README.PAM README.capabilities README.classes README.controls README.IPv6
358 %doc doc/*html contrib/*.html
360 %attr(750,root,ftp) %dir %{_sysconfdir}
361 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
362 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/ftpusers
363 %attr(640,root,root) %{_sysconfdir}/ftpusers.default
364 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/*
365 %attr(640,root,root) %ghost /var/log/*
366 %{?with_pam:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
368 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.ftp
370 %attr(755,root,root) %{_bindir}/*
371 %attr(755,root,root) %{_sbindir}/*
376 %dir /var/lib/ftp/pub
377 %attr(711,ftp,ftp) %dir /var/lib/ftp/pub/Incoming
380 %defattr(644,root,root,755)
381 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/ftpd
383 %lang(ja) %{_mandir}/ja/man5/ftpusers*
384 %lang(pl) %{_mandir}/pl/man5/ftpusers*
385 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
386 %lang(ru) %{_mandir}/ru/man5/ftpusers*
389 %defattr(644,root,root,755)
390 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/proftpd
391 %attr(754,root,root) /etc/rc.d/init.d/proftpd
393 %lang(ja) %{_mandir}/ja/man5/ftpusers*
394 %lang(pl) %{_mandir}/pl/man5/ftpusers*
395 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
396 %lang(ru) %{_mandir}/ru/man5/ftpusers*