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(pl): PROfesionalny serwer FTP
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 jest wysoce konfigurowalnym serwerem ftp dla systemów Unix.
63 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
64 dokunentacja jest dostêpna on-line pod http://www.proftpd.org/
65 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
68 Summary: PROfessional FTP Daemon with apache-like configuration syntax - common files
69 Summary(pl): PROfesionalny serwer FTP - wspólne pliki
76 %{?!_without_pam:Requires: pam >= 0.67}
77 Obsoletes: proftpd < 0:1.2.2rc1-3
80 ProFTPD is a highly configurable ftp daemon for unix and unix-like
81 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
82 replacement for wu-ftpd. Full online documentation is available at
83 http://www.proftpd.org/, including a server configuration directive
86 %description -l pl common
87 ProFTPD jest wysoce konfigurowalnym serwerem ftp dla systemów Unix.
88 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
89 dokunentacja jest dostêpna on-line pod http://www.proftpd.org/
90 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
93 Summary: inetd configs for proftpd
94 Summary(pl): Pliki konfiguracyjne do u¿ycia proftpd poprzez inetd
98 Prereq: %{name}-common = %{epoch}:%{version}
100 Provides: proftpd = %{epoch}:%{version}-%{release}
103 Obsoletes: proftpd-standalone
108 Obsoletes: heimdal-ftpd
109 Obsoletes: linux-ftpd
110 Obsoletes: muddleftpd
112 Obsoletes: troll-ftpd
116 ProFTPD configs for running from inetd.
118 %description -l pl inetd
119 Pliki konfiguracyjna ProFTPD do startowania demona poprzez inetd.
122 Summary: standalone daemon configs for proftpd
123 Summary(pl): Pliki konfiguracyjne do startowania proftpd w trybie standalone
127 Prereq: %{name}-common = %{version}
129 Prereq: /sbin/chkconfig
130 Provides: proftpd = %{epoch}:%{version}-%{release}
132 Obsoletes: proftpd-inetd
137 Obsoletes: heimdal-ftpd
138 Obsoletes: linux-ftpd
139 Obsoletes: muddleftpd
141 Obsoletes: troll-ftpd
144 %description standalone
145 ProFTPD configs for running as a standalone daemon.
147 %description -l pl standalone
148 Pliki konfiguracyjne ProFTPD do startowania demona w trybie standalone.
164 install -m644 %{SOURCE7} contrib/mod_tcpd.c
168 RUN_DIR=%{_localstatedir} ; export RUN_DIR
170 --enable-autoshadow \
171 --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} \
172 %{?!_without_ipv6:--enable-ipv6} \
173 %{?_without_ssl:--disable-tls} \
179 rm -rf $RPM_BUILD_ROOT
181 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,security,sysconfig/rc-inetd,rc.d/init.d} \
182 $RPM_BUILD_ROOT/{home/ftp/pub/Incoming,var/log}
184 %{__make} install DESTDIR=$RPM_BUILD_ROOT \
185 INSTALL_USER=`id -u` \
186 INSTALL_GROUP=`id -g`
188 rm -f $RPM_BUILD_ROOT%{_sbindir}/in.proftpd
190 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
191 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/ftpd
192 %{?!_without_pam:install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/ftp}
193 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/ftpd
194 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/proftpd
195 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/proftpd
196 install contrib/xferstats.holger-preiss $RPM_BUILD_ROOT%{_bindir}/xferstat
198 mv -f contrib/README contrib/README.modules
200 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers.default
201 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers
202 :> $RPM_BUILD_ROOT/var/log/xferlog
204 ln -sf proftpd $RPM_BUILD_ROOT%{_sbindir}/ftpd
206 :> $RPM_BUILD_ROOT/etc/security/blacklist.ftp
208 gzip -9nf sample-configurations/{virtual,anonymous}.conf ChangeLog README \
209 README.linux-* contrib/README.modules README.IPv6 README.PAM README.TLS
212 rm -rf $RPM_BUILD_ROOT
215 touch /var/log/xferlog
216 awk 'BEGIN { FS = ":" }; { if(($3 < 1000)&&($1 != "ftp")) print $1; }' < /etc/passwd >> %{_sysconfdir}/ftpusers.default
217 if [ ! -f %{_sysconfdir}/ftpusers ]; then
218 ( cd %{_sysconfdir}; mv -f ftpusers.default ftpusers )
222 if grep -iEqs "^ServerType[[:space:]]+standalone" %{_sysconfdir}/proftpd.conf ; then
223 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
224 sed -e "s/^ServerType[[:space:]]\+standalone/ServerType inetd/g" \
225 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
227 if [ -f /var/lock/subsys/rc-inetd ]; then
228 /etc/rc.d/init.d/rc-inetd reload 1>&2
230 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
234 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
235 /etc/rc.d/init.d/rc-inetd reload 1>&2
239 /sbin/chkconfig --add proftpd
240 if grep -iEqs "^ServerType[[:space:]]+inetd" %{_sysconfdir}/proftpd.conf ; then
241 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
242 sed -e "s/^ServerType[[:space:]]\+inetd/ServerType standalone/g" \
243 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
245 if [ -f /var/lock/subsys/proftpd ]; then
246 /etc/rc.d/init.d/proftpd restart 1>&2
248 echo "Run \"/etc/rc.d/init.d/proftpd start\" to start ProFTPD daemon."
252 if [ "$1" = "0" -a -f /var/lock/subsys/proftpd ]; then
253 /etc/rc.d/init.d/proftpd stop 1>&2
255 /sbin/chkconfig --del proftpd
258 %defattr(644,root,root,755)
259 %doc {ChangeLog,README*}.gz contrib/README.modules.gz
260 %doc sample-configurations/{virtual,anonymous}.conf.gz
263 %attr(750,root,ftp) %dir %{_sysconfdir}
264 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
265 %attr(640,root,root) /etc/logrotate.d/*
266 %attr(640,root,root) %ghost /var/log/*
267 %{?!_without_pam:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
269 %attr(640,root,root) %{_sysconfdir}/ftpusers.default
270 %attr(640,root,root) %ghost %{_sysconfdir}/ftpusers
271 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.ftp
273 %attr(755,root,root) %{_bindir}/*
274 %attr(755,root,root) %{_sbindir}/*
276 %{_mandir}/man[158]/*
279 %attr(711,root,root) %dir /home/ftp/pub/Incoming
282 %defattr(644,root,root,755)
283 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/ftpd
286 %defattr(644,root,root,755)
287 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/proftpd
288 %attr(754,root,root) /etc/rc.d/init.d/proftpd