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
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.2rc1-v6-20010406.patch.gz
30 # ftp://ftp.runestig.com/pub/proftpd-tls/
31 Patch1: %{name}-1.2.2rc1+v6-tls.20010401.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 URL: http://www.proftpd.org/
41 %{?!bcond_off_pam:BuildRequires: pam-devel}
42 %{?bcond_on_ldap:BuildRequires: openldap-devel}
43 %{?bcond_on_mysql:BuildRequires: mysql-devel}
44 %{?!bcond_off_ssl:BuildRequires: openssl-devel}
45 BuildRequires: libwrap-devel
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48 %define _sysconfdir /etc/ftpd
49 %define _localstatedir /var/run
52 ProFTPD is a highly configurable ftp daemon for unix and unix-like
53 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
54 replacement for wu-ftpd. Full online documentation is available at
55 http://www.proftpd.org/, including a server configuration directive
59 ProFTPD jest wysoce konfigurowalnym serwerem ftp dla systemów Unix.
60 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
61 dokunentacja jest dostêpna on-line pod http://www.proftpd.org/
62 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
65 Summary: PROfessional FTP Daemon with apache-like configuration syntax - common files
66 Summary(pl): PROfesionalny serwer FTP - wspólne pliki
71 %{?!bcond_off_pam:Requires: pam >= 0.67}
72 Obsoletes: proftpd < 0:1.2.2rc1-3
75 ProFTPD is a highly configurable ftp daemon for unix and unix-like
76 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
77 replacement for wu-ftpd. Full online documentation is available at
78 http://www.proftpd.org/, including a server configuration directive
81 %description -l pl common
82 ProFTPD jest wysoce konfigurowalnym serwerem ftp dla systemów Unix.
83 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
84 dokunentacja jest dostêpna on-line pod http://www.proftpd.org/
85 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
89 Summary: inetd configs for proftpd
90 Summary(pl): Pliki konfiguracyjne do u¿ycia proftpd poprzez inetd
94 Prereq: %{name}-common = %{epoch}:%{version}
96 Provides: proftpd = %{epoch}:%{version}-%{release}
99 Obsoletes: proftpd-standalone
104 Obsoletes: heimdal-ftpd
105 Obsoletes: linux-ftpd
110 ProFTPD configs for running from inetd.
112 %description -l pl inetd
113 Pliki konfiguracyjna ProFTPD do startowania demona poprzez inetd.
116 Summary: standalone daemon configs for proftpd
117 Summary(pl): Pliki konfiguracyjne do startowania proftpd w trybie standalone
121 Prereq: %{name}-common = %{version}
123 Provides: proftpd = %{epoch}:%{version}-%{release}
125 Obsoletes: proftpd-inetd
130 Obsoletes: heimdal-ftpd
131 Obsoletes: linux-ftpd
135 %description standalone
136 ProFTPD configs for running as a standalone daemon.
138 %description -l pl standalone
139 Pliki konfiguracyjne ProFTPD do startowania demona w trybie standalone.
153 install -m644 %{SOURCE7} contrib/mod_tcpd.c
157 RUN_DIR=%{_localstatedir} ; export RUN_DIR
159 --enable-autoshadow \
160 --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_sql:mod_sql_mysql} \
161 %{?!bcond_off_ipv6:--enable-ipv6} \
162 %{?bcond_off_ssl:--disable-tls} \
168 rm -rf $RPM_BUILD_ROOT
170 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,sysconfig/rc-inetd,rc.d/init.d} \
171 $RPM_BUILD_ROOT/{home/ftp/pub/Incoming,var/log}
173 %{__make} install DESTDIR=$RPM_BUILD_ROOT \
174 INSTALL_USER=`id -u` \
175 INSTALL_GROUP=`id -g`
177 rm -f $RPM_BUILD_ROOT%{_sbindir}/in.proftpd
179 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
180 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/ftpd
181 %{?!bcond_off_pam:install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/ftp}
182 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/ftpd
183 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/proftpd
184 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/proftpd
185 install contrib/xferstats.* $RPM_BUILD_ROOT%{_bindir}/xferstat
187 mv -f contrib/README contrib/README.modules
189 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers.default
190 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers
191 :> $RPM_BUILD_ROOT/var/log/xferlog
193 ln -s proftpd $RPM_BUILD_ROOT%{_sbindir}/ftpd
195 gzip -9nf sample-configurations/{virtual,anonymous}.conf ChangeLog README \
196 README.linux-* contrib/README.modules README.IPv6 README.PAM README.TLS
200 touch /var/log/xferlog
201 awk 'BEGIN { FS = ":" }; { if(($3 < 1000)&&($1 != "ftp")) print $1; }' < /etc/passwd >> %{_sysconfdir}/ftpusers.default
202 if [ ! -f %{_sysconfdir}/ftpusers ]; then
203 ( cd %{_sysconfdir}; mv -f ftpusers.default ftpusers )
207 if grep -iEqs "^ServerType[[:space:]]+standalone" %{_sysconfdir}/proftpd.conf ; then
208 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
209 sed -e "s/^ServerType[[:space:]]\+standalone/ServerType inetd/g" \
210 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
212 if [ -f /var/lock/subsys/rc-inetd ]; then
213 /etc/rc.d/init.d/rc-inetd restart 1>&2
215 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet sever" 1>&2
219 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
220 /etc/rc.d/init.d/rc-inetd reload 1>&2
224 /sbin/chkconfig --add proftpd
225 if grep -iEqs "^ServerType[[:space:]]+inetd" %{_sysconfdir}/proftpd.conf ; then
226 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
227 sed -e "s/^ServerType[[:space:]]\+inetd/ServerType standalone/g" \
228 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
230 if [ -f /var/lock/subsys/proftpd ]; then
231 /etc/rc.d/init.d/proftpd restart 1>&2
233 echo "Run \"/etc/rc.d/init.d/proftpd start\" to start ProFTPD daemon."
237 if [ "$1" = "0" -a -f /var/lock/subsys/proftpd ]; then
238 /etc/rc.d/init.d/proftpd stop 1>&2
240 /sbin/chkconfig --del proftpd
243 rm -rf $RPM_BUILD_ROOT
246 %defattr(644,root,root,755)
247 %doc {ChangeLog,README*}.gz contrib/README.modules.gz
248 %doc sample-configurations/{virtual,anonymous}.conf.gz
251 %attr(750,root,ftp) %dir %{_sysconfdir}
252 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
253 %attr(640,root,root) /etc/logrotate.d/*
254 %attr(640,root,root) %ghost /var/log/*
255 %{?!bcond_off_pam:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
257 %attr(640,root,root) %{_sysconfdir}/ftpusers.default
258 %attr(640,root,root) %ghost %{_sysconfdir}/ftpusers
260 %attr(755,root,root) %{_bindir}/*
261 %attr(755,root,root) %{_sbindir}/*
263 %{_mandir}/man[158]/*
266 %attr(711,root,root) %dir /home/ftp/pub/Incoming
269 %defattr(644,root,root,755)
270 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/ftpd
273 %defattr(644,root,root,755)
274 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/proftpd
275 %attr(754,root,root) /etc/rc.d/init.d/proftpd