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 URL: http://www.proftpd.org/
47 BuildRequires: autoconf
48 BuildRequires: automake
49 BuildRequires: libwrap-devel
50 %{?with_mysql:BuildRequires: mysql-devel}
51 %{?with_quotamysql:BuildRequires: mysql-devel}
52 BuildRequires: ncurses-devel
53 %{?with_ldap:BuildRequires: openldap-devel}
54 %{?with_quotaldap:BuildRequires: openldap-devel}
55 %{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
56 %{?with_pam:BuildRequires: pam-devel}
57 %{?with_pgsql:BuildRequires: postgresql-devel}
58 %{?with_quotapgsql:BuildRequires: postgresql-devel}
59 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61 %define _sysconfdir /etc/ftpd
62 %define _localstatedir /var/run
65 ProFTPD is a highly configurable FTP daemon for unix and unix-like
66 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
67 replacement for wu-ftpd. Full online documentation is available at
68 <http://www.proftpd.org/>, including a server configuration directive
71 This package also includes mod_shaper module from
72 <http://www.castaglia.org/proftpd/>
75 ProFTPD es un servidor FTP altamente configurable para sistemas
76 operativos unix. Está proyectado para ser un substituto directo al
77 wu-ftpd. La documentación completa está disponible en
78 <http://www.proftpd.org/>, incluido el manual de referencia para las
79 directivas de configuración del servidor.
82 ProFTPD jest wysoce konfigurowalnym serwerem FTP dla systemów Unix.
83 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
84 dokumentacja jest dostêpna on-line pod <http://www.proftpd.org/>
85 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
88 O ProFTPD é um servidor FTP altamente configurável para sistemas
91 É projetado para ser um substituto direto para o wu-ftpd. A
92 documentação completa está disponível em <http://www.proftpd.org/>,
93 incluindo o manual de referência para as diretivas de configuração do
97 Summary: PROfessional FTP Daemon with apache-like configuration syntax - common files
98 Summary(pl): PROfesionalny serwer FTP - wspólne pliki
101 Requires(post): fileutils
103 %{?with_pam:Requires: pam >= 0.79.0}
104 Obsoletes: proftpd < 0:1.2.2rc1-3
107 ProFTPD is a highly configurable FTP daemon for unix and unix-like
108 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
109 replacement for wu-ftpd. Full online documentation is available at
110 <http://www.proftpd.org/>, including a server configuration directive
113 %description common -l pl
114 ProFTPD jest wysoce konfigurowalnym serwerem FTP dla systemów Unix.
115 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
116 dokunentacja jest dostêpna on-line pod http://www.proftpd.org/
117 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
120 Summary: inetd configs for proftpd
121 Summary(pl): Pliki konfiguracyjne do u¿ycia proftpd poprzez inetd
123 PreReq: %{name}-common = %{epoch}:%{version}-%{release}
125 Requires(post): fileutils
128 Provides: proftpd = %{epoch}:%{version}-%{release}
130 Obsoletes: proftpd-standalone
136 Obsoletes: heimdal-ftpd
137 Obsoletes: linux-ftpd
138 Obsoletes: muddleftpd
140 Obsoletes: troll-ftpd
143 Conflicts: man-pages < 1.51
146 ProFTPD configs for running from inetd.
148 %description inetd -l pl
149 Pliki konfiguracyjna ProFTPD do startowania demona poprzez inetd.
152 Summary: Standalone daemon configs for proftpd
153 Summary(pl): Pliki konfiguracyjne do startowania proftpd w trybie standalone
155 PreReq: %{name}-common = %{epoch}:%{version}-%{release}
157 Requires(post,preun): /sbin/chkconfig
158 Requires(post): fileutils
161 Provides: proftpd = %{epoch}:%{version}-%{release}
163 Obsoletes: proftpd-inetd
169 Obsoletes: heimdal-ftpd
170 Obsoletes: linux-ftpd
171 Obsoletes: muddleftpd
173 Obsoletes: troll-ftpd
176 Conflicts: man-pages < 1.51
178 %description standalone
179 ProFTPD configs for running as a standalone daemon.
181 %description standalone -l pl
182 Pliki konfiguracyjne ProFTPD do startowania demona w trybie
186 %if %{with mysql} && %{with pgsql}
187 echo "Error: You can't build at once --with mysql and --with pgsql"
198 # move mod_shaper code on to the source tree
199 mv mod_shaper/mod_shaper.c contrib/
202 cp -f /usr/share/automake/config.sub .
204 RUN_DIR=%{_localstatedir} ; export RUN_DIR
205 CFLAGS="%{rpmcflags} -I/usr/include/ncurses %{?with_mysql:-I/usr/include/mysql}"
206 CPPFLAGS="%{rpmcflags} -I/usr/include/ncurses %{?with_mysql:-I/usr/include/mysql}"
213 %{?with_ipv6:mod_wrap}
214 %{?with_pam:mod_auth_pam}
215 %{?with_ldap:mod_ldap}
216 %{?with_quotafile:mod_quotatab mod_quotatab_file}
217 %{?with_quotaldap:mod_quotatab mod_quotatab_ldap}
218 %{?with_quotamysql:mod_quotatab mod_quotatab_sql}
219 %{?with_quotapgsql:mod_quotatab mod_quotatab_sql}
220 %{?with_linuxprivs:mod_linuxprivs}
221 %{?with_mysql:mod_sql mod_sql_mysql}
222 %{?with_pgsql:mod_sql mod_sql_postgres}
226 --enable-autoshadow \
227 --with-modules=$(echo $MODULES | tr ' ' ':') \
228 %{?with_ipv6:--enable-ipv6} \
229 %{!?with_ssl:--disable-tls} \
236 rm -rf $RPM_BUILD_ROOT
237 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,security,sysconfig/rc-inetd,rc.d/init.d} \
238 $RPM_BUILD_ROOT/var/{lib/ftp/pub/Incoming,log}
241 DESTDIR=$RPM_BUILD_ROOT \
242 INSTALL_USER=%(id -u) \
243 INSTALL_GROUP=%(id -g)
245 rm -f $RPM_BUILD_ROOT%{_sbindir}/in.proftpd
247 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
248 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/ftpd
249 %{?with_pam:install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/ftp}
250 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/ftpd
251 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/proftpd
252 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/proftpd
253 install contrib/xferstats.holger-preiss $RPM_BUILD_ROOT%{_bindir}/xferstat
255 bzip2 -dc %{SOURCE7} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
257 mv -f contrib/README contrib/README.modules
259 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers.default
260 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers
261 :> $RPM_BUILD_ROOT/var/log/xferlog
263 ln -sf proftpd $RPM_BUILD_ROOT%{_sbindir}/ftpd
265 :> $RPM_BUILD_ROOT/etc/security/blacklist.ftp
268 rm -rf $RPM_BUILD_ROOT
272 touch /var/log/xferlog
273 awk 'BEGIN { FS = ":" }; { if(($3 < 500)&&($1 != "ftp")) print $1; }' < /etc/passwd >> %{_sysconfdir}/ftpusers.default
274 if [ ! -f %{_sysconfdir}/ftpusers ]; then
275 cp -f %{_sysconfdir}/ftpusers.default %{_sysconfdir}/ftpusers
280 if grep -iEqs "^ServerType[[:space:]]+standalone" %{_sysconfdir}/proftpd.conf ; then
281 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
282 sed -e "s/^ServerType[[:space:]]\+standalone/ServerType inetd/g" \
283 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
285 if [ -f /var/lock/subsys/rc-inetd ]; then
286 /etc/rc.d/init.d/rc-inetd reload 1>&2
288 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
292 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
293 /etc/rc.d/init.d/rc-inetd reload 1>&2
297 /sbin/chkconfig --add proftpd
298 if grep -iEqs "^ServerType[[:space:]]+inetd" %{_sysconfdir}/proftpd.conf ; then
299 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
300 sed -e "s/^ServerType[[:space:]]\+inetd/ServerType standalone/g" \
301 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
303 if [ -f /var/lock/subsys/proftpd ]; then
304 /etc/rc.d/init.d/proftpd restart 1>&2
306 echo "Run \"/etc/rc.d/init.d/proftpd start\" to start ProFTPD daemon."
310 if [ "$1" = "0" ]; then
311 if [ -f /var/lock/subsys/proftpd ]; then
312 /etc/rc.d/init.d/proftpd stop 1>&2
314 /sbin/chkconfig --del proftpd
317 %triggerpostun -- %{name}-inetd <= 1.2.10-1
318 echo "Changing deprecated config uptions"
319 cp /etc/ftpd/proftpd.conf /etc/ftpd/proftpd.conf.backup
320 sed -i -e 's/AuthPAMAuthoritative\b/AuthPAM/' /etc/ftpd/proftpd.conf
321 sed -i -e 's/TCPDServiceName/TCPServiceName/' /etc/ftpd/proftpd.conf
322 grep -v UseTCPD /etc/ftpd/proftpd.conf > /etc/ftpd/proftpd.conf.tmp
323 mv -f /etc/ftpd/proftpd.conf.tmp /etc/ftpd/proftpd.conf
324 chmod 640 /etc/ftpd/proftpd.conf
326 %triggerpostun -- %{name}-standalone <= 1.2.10-1
327 echo "Changing deprecated config uptions"
328 cp /etc/ftpd/proftpd.conf /etc/ftpd/proftpd.conf.backup
329 sed -i -e 's/AuthPAMAuthoritative\b/AuthPAM/' /etc/ftpd/proftpd.conf
330 sed -i -e 's/TCPDServiceName/TCPServiceName/' /etc/ftpd/proftpd.conf
331 grep -v UseTCPD /etc/ftpd/proftpd.conf > /etc/ftpd/proftpd.conf.tmp
332 mv -f /etc/ftpd/proftpd.conf.tmp /etc/ftpd/proftpd.conf
333 chmod 640 /etc/ftpd/proftpd.conf
336 %defattr(644,root,root,755)
337 %doc sample-configurations/*.conf CREDITS ChangeLog NEWS RELEASE_NOTES
338 %doc README README.LDAP README.PAM README.capabilities README.classes README.controls README.IPv6
340 %doc doc/*html contrib/*.html
342 %attr(750,root,ftp) %dir %{_sysconfdir}
343 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
344 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/ftpusers
345 %attr(640,root,root) %{_sysconfdir}/ftpusers.default
346 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/*
347 %attr(640,root,root) %ghost /var/log/*
348 %{?with_pam:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
350 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.ftp
352 %attr(755,root,root) %{_bindir}/*
353 %attr(755,root,root) %{_sbindir}/*
358 %dir /var/lib/ftp/pub
359 %attr(711,ftp,ftp) %dir /var/lib/ftp/pub/Incoming
362 %defattr(644,root,root,755)
363 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/ftpd
365 %lang(ja) %{_mandir}/ja/man5/ftpusers*
366 %lang(pl) %{_mandir}/pl/man5/ftpusers*
367 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
368 %lang(ru) %{_mandir}/ru/man5/ftpusers*
371 %defattr(644,root,root,755)
372 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/proftpd
373 %attr(754,root,root) /etc/rc.d/init.d/proftpd
375 %lang(ja) %{_mandir}/ja/man5/ftpusers*
376 %lang(pl) %{_mandir}/pl/man5/ftpusers*
377 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
378 %lang(ru) %{_mandir}/ru/man5/ftpusers*