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.org/distrib/source/%{name}-%{version}.tar.bz2
22 Source2: %{name}.logrotate
24 Source4: %{name}.inetd
25 Source5: %{name}.sysconfig
27 Source7: %{name}-mod_tcpd.c
28 Patch0: %{name}-1.2.2rc1-v6-20010406.patch.gz
29 # ftp://ftp.runestig.com/pub/proftpd-tls/
30 Patch1: %{name}-1.2.2rc1+v6-tls.20010401.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}-DESTDIR.patch
37 Patch8: %{name}-wtmp.patch
38 Patch9: %{name}-link.patch
39 URL: http://www.proftpd.org/
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 >= 0.9.6a}
44 BuildRequires: libwrap-devel
45 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47 %define _sysconfdir /etc/ftpd
48 %define _localstatedir /var/run
51 ProFTPD is a highly configurable ftp daemon for unix and unix-like
52 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
53 replacement for wu-ftpd. Full online documentation is available at
54 http://www.proftpd.org/, including a server configuration directive
58 ProFTPD jest wysoce konfigurowalnym serwerem ftp dla systemów Unix.
59 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
60 dokunentacja jest dostêpna on-line pod http://www.proftpd.org/
61 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
64 Summary: PROfessional FTP Daemon with apache-like configuration syntax - common files
65 Summary(pl): PROfesionalny serwer FTP - wspólne pliki
70 %{?!bcond_off_pam:Requires: pam >= 0.67}
71 Obsoletes: proftpd < 0:1.2.2rc1-3
74 ProFTPD is a highly configurable ftp daemon for unix and unix-like
75 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
76 replacement for wu-ftpd. Full online documentation is available at
77 http://www.proftpd.org/, including a server configuration directive
80 %description -l pl common
81 ProFTPD jest wysoce konfigurowalnym serwerem ftp dla systemów Unix.
82 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
83 dokunentacja jest dostêpna on-line pod http://www.proftpd.org/
84 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
87 Summary: inetd configs for proftpd
88 Summary(pl): Pliki konfiguracyjne do u¿ycia proftpd poprzez inetd
92 Prereq: %{name}-common = %{epoch}:%{version}
94 Provides: proftpd = %{epoch}:%{version}-%{release}
97 Obsoletes: proftpd-standalone
102 Obsoletes: heimdal-ftpd
103 Obsoletes: linux-ftpd
108 ProFTPD configs for running from inetd.
110 %description -l pl inetd
111 Pliki konfiguracyjna ProFTPD do startowania demona poprzez inetd.
114 Summary: standalone daemon configs for proftpd
115 Summary(pl): Pliki konfiguracyjne do startowania proftpd w trybie standalone
119 Prereq: %{name}-common = %{version}
121 Provides: proftpd = %{epoch}:%{version}-%{release}
123 Obsoletes: proftpd-inetd
128 Obsoletes: heimdal-ftpd
129 Obsoletes: linux-ftpd
133 %description standalone
134 ProFTPD configs for running as a standalone daemon.
136 %description -l pl standalone
137 Pliki konfiguracyjne ProFTPD do startowania demona w trybie standalone.
151 install -m644 %{SOURCE7} contrib/mod_tcpd.c
155 RUN_DIR=%{_localstatedir} ; export RUN_DIR
157 --enable-autoshadow \
158 --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} \
159 %{?!bcond_off_ipv6:--enable-ipv6} \
160 %{?bcond_off_ssl:--disable-tls} \
166 rm -rf $RPM_BUILD_ROOT
168 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,sysconfig/rc-inetd,rc.d/init.d} \
169 $RPM_BUILD_ROOT/{home/ftp/pub/Incoming,var/log}
171 %{__make} install DESTDIR=$RPM_BUILD_ROOT \
172 INSTALL_USER=`id -u` \
173 INSTALL_GROUP=`id -g`
175 rm -f $RPM_BUILD_ROOT%{_sbindir}/in.proftpd
177 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
178 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/ftpd
179 %{?!bcond_off_pam:install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/ftp}
180 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/ftpd
181 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/proftpd
182 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/proftpd
183 install contrib/xferstats.* $RPM_BUILD_ROOT%{_bindir}/xferstat
185 mv -f contrib/README contrib/README.modules
187 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers.default
188 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers
189 :> $RPM_BUILD_ROOT/var/log/xferlog
191 ln -s proftpd $RPM_BUILD_ROOT%{_sbindir}/ftpd
193 gzip -9nf sample-configurations/{virtual,anonymous}.conf ChangeLog README \
194 README.linux-* contrib/README.modules README.IPv6 README.PAM README.TLS
198 touch /var/log/xferlog
199 awk 'BEGIN { FS = ":" }; { if(($3 < 1000)&&($1 != "ftp")) print $1; }' < /etc/passwd >> %{_sysconfdir}/ftpusers.default
200 if [ ! -f %{_sysconfdir}/ftpusers ]; then
201 ( cd %{_sysconfdir}; mv -f ftpusers.default ftpusers )
205 if grep -iEqs "^ServerType[[:space:]]+standalone" %{_sysconfdir}/proftpd.conf ; then
206 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
207 sed -e "s/^ServerType[[:space:]]\+standalone/ServerType inetd/g" \
208 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
210 if [ -f /var/lock/subsys/rc-inetd ]; then
211 /etc/rc.d/init.d/rc-inetd restart 1>&2
213 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet sever" 1>&2
217 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
218 /etc/rc.d/init.d/rc-inetd reload 1>&2
222 /sbin/chkconfig --add proftpd
223 if grep -iEqs "^ServerType[[:space:]]+inetd" %{_sysconfdir}/proftpd.conf ; then
224 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
225 sed -e "s/^ServerType[[:space:]]\+inetd/ServerType standalone/g" \
226 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
228 if [ -f /var/lock/subsys/proftpd ]; then
229 /etc/rc.d/init.d/proftpd restart 1>&2
231 echo "Run \"/etc/rc.d/init.d/proftpd start\" to start ProFTPD daemon."
235 if [ "$1" = "0" -a -f /var/lock/subsys/proftpd ]; then
236 /etc/rc.d/init.d/proftpd stop 1>&2
238 /sbin/chkconfig --del proftpd
241 rm -rf $RPM_BUILD_ROOT
244 %defattr(644,root,root,755)
245 %doc {ChangeLog,README*}.gz contrib/README.modules.gz
246 %doc sample-configurations/{virtual,anonymous}.conf.gz
249 %attr(750,root,ftp) %dir %{_sysconfdir}
250 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
251 %attr(640,root,root) /etc/logrotate.d/*
252 %attr(640,root,root) %ghost /var/log/*
253 %{?!bcond_off_pam:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
255 %attr(640,root,root) %{_sysconfdir}/ftpusers.default
256 %attr(640,root,root) %ghost %{_sysconfdir}/ftpusers
258 %attr(755,root,root) %{_bindir}/*
259 %attr(755,root,root) %{_sbindir}/*
261 %{_mandir}/man[158]/*
264 %attr(711,root,root) %dir /home/ftp/pub/Incoming
267 %defattr(644,root,root,755)
268 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/ftpd
271 %defattr(644,root,root,755)
272 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/proftpd
273 %attr(754,root,root) /etc/rc.d/init.d/proftpd