3 # bcond_off_pam - disable PAM support
4 # bcond_on_ldap - enable LDAP suppoer
5 # bcond_on_mysql - enable MySQL suppoer
6 # bcond_on_quota - enable quota support
7 # bcond_on_linuxprivs - enable libcap support
8 # bcond_off_ipv6 - disable IPv6 and TCPD support
9 # bcond_off_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(pl): PROfesionalny serwer FTP
20 Source0: ftp://ftp.proftpd.net/pub/proftpd/%{name}-%{version}.tar.gz
22 Source2: %{name}.logrotate
24 Source4: %{name}.inetd
25 Source5: %{name}.sysconfig
27 Source7: %{name}-mod_tcpd.c
28 Patch0: %{name}-1.2.0rc3-v6-20010206.patch.gz
29 # ftp://ftp.runestig.com/pub/proftpd-tls/
30 Patch1: %{name}-1.2.0rc3+v6-tls.20010206.patch.gz
31 Patch2: %{name}-umode_t.patch
32 Patch3: %{name}-glibc.patch
33 Patch4: %{name}-paths.patch
34 Patch5: %{name}-release.patch
35 Patch6: %{name}-noautopriv.patch
36 Patch7: %{name}-betterlog.patch
37 Patch8: %{name}-DESTDIR.patch
38 Patch9: %{name}-wtmp.patch
39 URL: http://www.proftpd.net/
40 %{?!bcond_off_pam:BuildRequires: pam-devel}
41 %{?bcond_on_ldap:BuildRequires: openldap-devel}
42 %{?bcond_on_mysql:BuildRequires: mysql-devel}
43 %{?!bcond_off_ssl:BuildRequires: openssl-devel}
48 %{?!bcond_off_pam:Requires: pam >= 0.67}
49 Requires: %{name}-setup = %{version}
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57 Obsoletes: heimdal-ftpd
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
73 ProFTPD jest wysoce konfigurowalnym serwerem ftp dla systemów Unix.
74 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
75 dokunentacja jest dostêpna on-line pod http://www.proftpd.org/
76 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
79 Summary: inetd configs for proftpd
83 Prereq: %{name} = %{version}
84 Provides: %{name}-setup
85 Obsoletes: proftpd-standalone
88 ProFTPD configs for running from inetd.
91 Summary: standalone daemon configs for proftpd
95 Prereq: %{name} = %{version}
96 Provides: %{name}-setup
97 Obsoletes: proftpd-inetd
99 %description standalone
100 ProFTPD configs for running as a standalone daemon.
114 install -m644 %{SOURCE7} contrib/mod_tcpd.c
118 RUN_DIR=%{_localstatedir} ; export RUN_DIR
120 --enable-autoshadow \
121 --with-modules=mod_ratio:mod_readme%{?!bcond_off_ipv6::mod_tcpd}%{?!bcond_off_pam::mod_pam}%{?bcond_on_ldap::mod_ldap}%{?bcond_on_quota::mod_quota}%{?bcond_on_linuxprivs::mod_linuxprivs}%{?bcond_on_mysql::mod_sqlpw:mod_mysql} \
122 %{?!bcond_off_ipv6:--enable-ipv6} \
123 %{?bcond_off_ssl:--disable-tls} \
129 rm -rf $RPM_BUILD_ROOT
131 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,sysconfig/rc-inetd,rc.d/init.d} \
132 $RPM_BUILD_ROOT/{home/ftp/pub/Incoming,var/log}
134 %{__make} install DESTDIR=$RPM_BUILD_ROOT \
135 INSTALL_USER=`id -u` \
136 INSTALL_GROUP=`id -g`
138 rm -f $RPM_BUILD_ROOT%{_sbindir}/in.proftpd
140 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
141 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/ftpd
142 %{?!bcond_off_pam:install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/ftp}
143 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/ftpd
144 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/proftpd
145 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/proftpd
146 install contrib/xferstats.* $RPM_BUILD_ROOT%{_bindir}/xferstat
148 mv -f contrib/README contrib/README.modules
150 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers.default
151 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers
152 :> $RPM_BUILD_ROOT/var/log/xferlog
154 ln -s proftpd $RPM_BUILD_ROOT%{_sbindir}/ftpd
156 gzip -9nf sample-configurations/{virtual,anonymous}.conf ChangeLog README \
157 README.linux-* contrib/README.modules README.IPv6 README.PAM \
161 touch /var/log/xferlog
162 awk 'BEGIN { FS = ":" }; { if(($3 < 1000)&&($1 != "ftp")) print $1; }' < /etc/passwd >> %{_sysconfdir}/ftpusers.default
163 if [ ! -f %{_sysconfdir}/ftpusers ]; then
164 ( cd %{_sysconfdir}; mv -f ftpusers.default ftpusers )
168 if grep -iEqs "^ServerType[[:space:]]+standalone" %{_sysconfdir}/proftpd.conf ; then
169 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
170 sed -e "s/^ServerType[[:space:]]\+standalone/ServerType inetd/g" \
171 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
173 if [ -f /var/lock/subsys/rc-inetd ]; then
174 /etc/rc.d/init.d/rc-inetd restart 1>&2
176 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet sever" 1>&2
180 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
181 /etc/rc.d/init.d/rc-inetd reload 1>&2
185 /sbin/chkconfig --add proftpd
186 if grep -iEqs "^ServerType[[:space:]]+inetd" %{_sysconfdir}/proftpd.conf ; then
187 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
188 sed -e "s/^ServerType[[:space:]]\+inetd/ServerType standalone/g" \
189 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
191 if [ -f /var/lock/subsys/proftpd ]; then
192 /etc/rc.d/init.d/proftpd restart 1>&2
194 echo "Run \"/etc/rc.d/init.d/proftpd start\" to start ProFTPD daemon."
198 if [ "$1" = "0" -a -f /var/lock/subsys/proftpd ]; then
199 /etc/rc.d/init.d/proftpd stop 1>&2
201 /sbin/chkconfig --del proftpd
204 rm -rf $RPM_BUILD_ROOT
207 %defattr(644,root,root,755)
208 %doc {ChangeLog,README*}.gz contrib/README.modules.gz
209 %doc sample-configurations/{virtual,anonymous}.conf.gz
212 %attr(750,root,root) %dir %{_sysconfdir}
213 %attr(640,root,root) /etc/logrotate.d/*
214 %attr(640,root,root) %ghost /var/log/*
215 %{?!bcond_off_pam:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
217 %attr(640,root,root) %{_sysconfdir}/ftpusers.default
218 %attr(640,root,root) %ghost %{_sysconfdir}/ftpusers
220 %attr(755,root,root) %{_bindir}/*
221 %attr(755,root,root) %{_sbindir}/*
223 %{_mandir}/man[158]/*
226 %attr(711,root,root) %dir /home/ftp/pub/Incoming
229 %defattr(644,root,root,755)
230 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
231 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/ftpd
234 %defattr(644,root,root,755)
235 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
236 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/proftpd
237 %attr(754,root,root) /etc/rc.d/init.d/proftpd