3 # _without_pam - disable PAM support
4 # _with_ldap - enable LDAP suppoer
5 # _with_mysql - enable MySQL suppoer
6 # _with_quota - enable quota support
7 # _with_linuxprivs - enable libcap support
8 # _without_ipv6 - disable IPv6 and TCPD support
9 # _without_ssl - disbale TLS/SSL support
10 # --without pam --with ldap --with mysql --with quota --with linuxprivs
11 Summary: PROfessional FTP Daemon with apache-like configuration syntax
12 Summary(es): Servidor FTP profesional, con sintaxis de configuración semejante a la del apache
13 Summary(pl): PROfesionalny serwer FTP
14 Summary(pt_BR): Servidor FTP profissional, com sintaxe de configuração semelhante à do apache
21 Source0: ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}.tar.bz2
23 Source2: %{name}.logrotate
25 Source4: %{name}.inetd
26 Source5: %{name}.sysconfig
28 Source7: %{name}-mod_tcpd.c
29 Patch0: %{name}-1.2.2rc3-v6-20010814.patch.gz
30 # ftp://ftp.runestig.com/pub/proftpd-tls/
31 Patch1: %{name}-1.2.2rc3+v6-tls.20010505.patch.gz
32 Patch2: %{name}-umode_t.patch
33 Patch3: %{name}-glibc.patch
34 Patch4: %{name}-paths.patch
35 Patch5: %{name}-release.patch
36 Patch6: %{name}-noautopriv.patch
37 Patch7: %{name}-DESTDIR.patch
38 Patch8: %{name}-wtmp.patch
39 Patch9: %{name}-link.patch
40 Patch10: %{name}-port-65535.patch
41 Patch11: %{name}-v6_fix.patch
42 URL: http://www.proftpd.org/
43 %{?!_without_pam:BuildRequires: pam-devel}
44 %{?_with_ldap:BuildRequires: openldap-devel}
45 %{?_with_mysql:BuildRequires: mysql-devel}
46 %{?!_without_ssl:BuildRequires: openssl-devel >= 0.9.6a}
47 BuildRequires: libwrap-devel
48 BuildRequires: autoconf
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
90 %{?!_without_pam:Requires: pam >= 0.67}
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 Provides: proftpd = %{epoch}:%{version}-%{release}
115 Obsoletes: proftpd-standalone
120 Obsoletes: heimdal-ftpd
121 Obsoletes: linux-ftpd
122 Obsoletes: muddleftpd
124 Obsoletes: troll-ftpd
128 ProFTPD configs for running from inetd.
130 %description inetd -l pl
131 Pliki konfiguracyjna ProFTPD do startowania demona poprzez inetd.
134 Summary: standalone daemon configs for proftpd
135 Summary(pl): Pliki konfiguracyjne do startowania proftpd w trybie standalone
137 Prereq: %{name}-common = %{version}
139 Prereq: /sbin/chkconfig
140 Provides: proftpd = %{epoch}:%{version}-%{release}
142 Obsoletes: proftpd-inetd
147 Obsoletes: heimdal-ftpd
148 Obsoletes: linux-ftpd
149 Obsoletes: muddleftpd
151 Obsoletes: troll-ftpd
154 %description standalone
155 ProFTPD configs for running as a standalone daemon.
157 %description standalone -l pl
158 Pliki konfiguracyjne ProFTPD do startowania demona w trybie
175 install -m644 %{SOURCE7} contrib/mod_tcpd.c
179 RUN_DIR=%{_localstatedir} ; export RUN_DIR
181 --enable-autoshadow \
182 --with-modules=mod_ratio:mod_readme%{?!_without_ipv6::mod_tcpd}%{?!_without_pam::mod_pam}%{?_with_ldap::mod_ldap}%{?_with_quota::mod_quota}%{?_with_linuxprivs::mod_linuxprivs}%{?_with_mysql::mod_sql:mod_sql_mysql} \
183 %{?!_without_ipv6:--enable-ipv6} \
184 %{?_without_ssl:--disable-tls} \
190 rm -rf $RPM_BUILD_ROOT
192 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,security,sysconfig/rc-inetd,rc.d/init.d} \
193 $RPM_BUILD_ROOT/{home/ftp/pub/Incoming,var/log}
195 %{__make} install DESTDIR=$RPM_BUILD_ROOT \
196 INSTALL_USER=`id -u` \
197 INSTALL_GROUP=`id -g`
199 rm -f $RPM_BUILD_ROOT%{_sbindir}/in.proftpd
201 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
202 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/ftpd
203 %{?!_without_pam:install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/ftp}
204 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/ftpd
205 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/proftpd
206 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/proftpd
207 install contrib/xferstats.holger-preiss $RPM_BUILD_ROOT%{_bindir}/xferstat
209 mv -f contrib/README contrib/README.modules
211 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers.default
212 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers
213 :> $RPM_BUILD_ROOT/var/log/xferlog
215 ln -sf proftpd $RPM_BUILD_ROOT%{_sbindir}/ftpd
217 :> $RPM_BUILD_ROOT/etc/security/blacklist.ftp
219 gzip -9nf sample-configurations/{virtual,anonymous}.conf ChangeLog README \
220 README.linux-* contrib/README.modules README.IPv6 README.PAM \
221 README.TLS README.mod_sql README.LDAP
224 rm -rf $RPM_BUILD_ROOT
227 touch /var/log/xferlog
228 awk 'BEGIN { FS = ":" }; { if(($3 < 1000)&&($1 != "ftp")) print $1; }' < /etc/passwd >> %{_sysconfdir}/ftpusers.default
229 if [ ! -f %{_sysconfdir}/ftpusers ]; then
230 ( cd %{_sysconfdir}; mv -f ftpusers.default ftpusers )
234 if grep -iEqs "^ServerType[[:space:]]+standalone" %{_sysconfdir}/proftpd.conf ; then
235 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
236 sed -e "s/^ServerType[[:space:]]\+standalone/ServerType inetd/g" \
237 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
239 if [ -f /var/lock/subsys/rc-inetd ]; then
240 /etc/rc.d/init.d/rc-inetd reload 1>&2
242 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
246 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
247 /etc/rc.d/init.d/rc-inetd reload 1>&2
251 /sbin/chkconfig --add proftpd
252 if grep -iEqs "^ServerType[[:space:]]+inetd" %{_sysconfdir}/proftpd.conf ; then
253 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
254 sed -e "s/^ServerType[[:space:]]\+inetd/ServerType standalone/g" \
255 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
257 if [ -f /var/lock/subsys/proftpd ]; then
258 /etc/rc.d/init.d/proftpd restart 1>&2
260 echo "Run \"/etc/rc.d/init.d/proftpd start\" to start ProFTPD daemon."
264 if [ "$1" = "0" ]; then
265 if [ -f /var/lock/subsys/proftpd ]; then
266 /etc/rc.d/init.d/proftpd stop 1>&2
268 /sbin/chkconfig --del proftpd
272 %defattr(644,root,root,755)
273 %doc {ChangeLog,README*}.gz contrib/README.modules.gz
274 %doc sample-configurations/{virtual,anonymous}.conf.gz
277 %attr(750,root,ftp) %dir %{_sysconfdir}
278 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
279 %attr(640,root,root) /etc/logrotate.d/*
280 %attr(640,root,root) %ghost /var/log/*
281 %{?!_without_pam:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
283 %attr(640,root,root) %{_sysconfdir}/ftpusers.default
284 %attr(640,root,root) %ghost %{_sysconfdir}/ftpusers
285 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.ftp
287 %attr(755,root,root) %{_bindir}/*
288 %attr(755,root,root) %{_sbindir}/*
290 %{_mandir}/man[158]/*
293 %attr(711,root,root) %dir /home/ftp/pub/Incoming
296 %defattr(644,root,root,755)
297 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/ftpd
300 %defattr(644,root,root,755)
301 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/proftpd
302 %attr(754,root,root) /etc/rc.d/init.d/proftpd