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 URL: http://www.proftpd.org/
42 %{?!_without_pam:BuildRequires: pam-devel}
43 %{?_with_ldap:BuildRequires: openldap-devel}
44 %{?_with_mysql:BuildRequires: mysql-devel}
45 %{?!_without_ssl:BuildRequires: openssl-devel >= 0.9.6a}
46 BuildRequires: libwrap-devel
47 BuildRequires: autoconf
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 %define _sysconfdir /etc/ftpd
51 %define _localstatedir /var/run
54 ProFTPD is a highly configurable ftp daemon for unix and unix-like
55 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
56 replacement for wu-ftpd. Full online documentation is available at
57 http://www.proftpd.org/, including a server configuration directive
61 ProFTPD jest wysoce konfigurowalnym serwerem ftp dla systemów Unix.
62 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
63 dokunentacja jest dostêpna on-line pod http://www.proftpd.org/
64 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
67 Summary: PROfessional FTP Daemon with apache-like configuration syntax - common files
68 Summary(pl): PROfesionalny serwer FTP - wspólne pliki
75 %{?!_without_pam:Requires: pam >= 0.67}
76 Obsoletes: proftpd < 0:1.2.2rc1-3
79 ProFTPD is a highly configurable ftp daemon for unix and unix-like
80 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
81 replacement for wu-ftpd. Full online documentation is available at
82 http://www.proftpd.org/, including a server configuration directive
85 %description -l pl common
86 ProFTPD jest wysoce konfigurowalnym serwerem ftp dla systemów Unix.
87 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
88 dokunentacja jest dostêpna on-line pod http://www.proftpd.org/
89 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
92 Summary: inetd configs for proftpd
93 Summary(pl): Pliki konfiguracyjne do u¿ycia proftpd poprzez inetd
97 Prereq: %{name}-common = %{epoch}:%{version}
99 Provides: proftpd = %{epoch}:%{version}-%{release}
102 Obsoletes: proftpd-standalone
107 Obsoletes: heimdal-ftpd
108 Obsoletes: linux-ftpd
109 Obsoletes: muddleftpd
111 Obsoletes: troll-ftpd
115 ProFTPD configs for running from inetd.
117 %description -l pl inetd
118 Pliki konfiguracyjna ProFTPD do startowania demona poprzez inetd.
121 Summary: standalone daemon configs for proftpd
122 Summary(pl): Pliki konfiguracyjne do startowania proftpd w trybie standalone
126 Prereq: %{name}-common = %{version}
128 Prereq: /sbin/chkconfig
129 Provides: proftpd = %{epoch}:%{version}-%{release}
131 Obsoletes: proftpd-inetd
136 Obsoletes: heimdal-ftpd
137 Obsoletes: linux-ftpd
138 Obsoletes: muddleftpd
140 Obsoletes: troll-ftpd
143 %description standalone
144 ProFTPD configs for running as a standalone daemon.
146 %description -l pl standalone
147 Pliki konfiguracyjne ProFTPD do startowania demona w trybie standalone.
162 install -m644 %{SOURCE7} contrib/mod_tcpd.c
166 RUN_DIR=%{_localstatedir} ; export RUN_DIR
168 --enable-autoshadow \
169 --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} \
170 %{?!_without_ipv6:--enable-ipv6} \
171 %{?_without_ssl:--disable-tls} \
177 rm -rf $RPM_BUILD_ROOT
179 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,security,sysconfig/rc-inetd,rc.d/init.d} \
180 $RPM_BUILD_ROOT/{home/ftp/pub/Incoming,var/log}
182 %{__make} install DESTDIR=$RPM_BUILD_ROOT \
183 INSTALL_USER=`id -u` \
184 INSTALL_GROUP=`id -g`
186 rm -f $RPM_BUILD_ROOT%{_sbindir}/in.proftpd
188 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
189 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/ftpd
190 %{?!_without_pam:install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/ftp}
191 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/ftpd
192 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/proftpd
193 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/proftpd
194 install contrib/xferstats.holger-preiss $RPM_BUILD_ROOT%{_bindir}/xferstat
196 mv -f contrib/README contrib/README.modules
198 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers.default
199 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers
200 :> $RPM_BUILD_ROOT/var/log/xferlog
202 ln -sf proftpd $RPM_BUILD_ROOT%{_sbindir}/ftpd
204 :> $RPM_BUILD_ROOT/etc/security/blacklist.ftp
206 gzip -9nf sample-configurations/{virtual,anonymous}.conf ChangeLog README \
207 README.linux-* contrib/README.modules README.IPv6 README.PAM README.TLS
210 rm -rf $RPM_BUILD_ROOT
213 touch /var/log/xferlog
214 awk 'BEGIN { FS = ":" }; { if(($3 < 1000)&&($1 != "ftp")) print $1; }' < /etc/passwd >> %{_sysconfdir}/ftpusers.default
215 if [ ! -f %{_sysconfdir}/ftpusers ]; then
216 ( cd %{_sysconfdir}; mv -f ftpusers.default ftpusers )
220 if grep -iEqs "^ServerType[[:space:]]+standalone" %{_sysconfdir}/proftpd.conf ; then
221 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
222 sed -e "s/^ServerType[[:space:]]\+standalone/ServerType inetd/g" \
223 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
225 if [ -f /var/lock/subsys/rc-inetd ]; then
226 /etc/rc.d/init.d/rc-inetd reload 1>&2
228 echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
232 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
233 /etc/rc.d/init.d/rc-inetd reload 1>&2
237 /sbin/chkconfig --add proftpd
238 if grep -iEqs "^ServerType[[:space:]]+inetd" %{_sysconfdir}/proftpd.conf ; then
239 cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
240 sed -e "s/^ServerType[[:space:]]\+inetd/ServerType standalone/g" \
241 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
243 if [ -f /var/lock/subsys/proftpd ]; then
244 /etc/rc.d/init.d/proftpd restart 1>&2
246 echo "Run \"/etc/rc.d/init.d/proftpd start\" to start ProFTPD daemon."
250 if [ "$1" = "0" -a -f /var/lock/subsys/proftpd ]; then
251 /etc/rc.d/init.d/proftpd stop 1>&2
253 /sbin/chkconfig --del proftpd
256 %defattr(644,root,root,755)
257 %doc {ChangeLog,README*}.gz contrib/README.modules.gz
258 %doc sample-configurations/{virtual,anonymous}.conf.gz
261 %attr(750,root,ftp) %dir %{_sysconfdir}
262 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
263 %attr(640,root,root) /etc/logrotate.d/*
264 %attr(640,root,root) %ghost /var/log/*
265 %{?!_without_pam:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
267 %attr(640,root,root) %{_sysconfdir}/ftpusers.default
268 %attr(640,root,root) %ghost %{_sysconfdir}/ftpusers
269 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.ftp
271 %attr(755,root,root) %{_bindir}/*
272 %attr(755,root,root) %{_sbindir}/*
274 %{_mandir}/man[158]/*
277 %attr(711,root,root) %dir /home/ftp/pub/Incoming
280 %defattr(644,root,root,755)
281 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/ftpd
284 %defattr(644,root,root,755)
285 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/proftpd
286 %attr(754,root,root) /etc/rc.d/init.d/proftpd