]> git.pld-linux.org Git - packages/proftpd.git/blob - proftpd.spec
cefe0f6feee3282641fdea5968aaf791cc719c8f
[packages/proftpd.git] / proftpd.spec
1 #
2 # Conditional build:
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 #
11 Summary:        PROfessional FTP Daemon with apache-like configuration syntax
12 Summary(es):    Servidor FTP profesional, con sintaxis de configuración semejante a la del apache
13 Summary(pl):    PROfesionalny serwer FTP
14 Summary(pt_BR): Servidor FTP profissional, com sintaxe de configuração semelhante à do apache
15 Summary(zh_CN): Ò×ÓÚ¹ÜÀíµÄ,°²È«µÄ FTP ·þÎñÆ÷
16 Name:           proftpd
17 Version:        1.2.8
18 Release:        2
19 Epoch:          1
20 License:        GPL
21 Group:          Daemons
22 Source0:        ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}.tar.bz2
23 Source1:        %{name}.conf
24 Source2:        %{name}.logrotate
25 Source3:        ftp.pamd
26 Source4:        %{name}.inetd
27 Source5:        %{name}.sysconfig
28 Source6:        %{name}.init
29 Source7:        %{name}-mod_tcpd.c
30 Source8:        ftpusers.tar.bz2
31 Patch0:         %{name}-1.2.5-v6-20020808.patch.gz
32 # ftp://ftp.runestig.com/pub/proftpd-tls/
33 Patch1:         %{name}-1.2.2rc3+v6-tls.20010505.patch.gz
34 Patch2:         %{name}-umode_t.patch
35 Patch3:         %{name}-glibc.patch
36 Patch4:         %{name}-paths.patch
37 Patch5:         %{name}-release.patch
38 Patch6:         %{name}-noautopriv.patch
39 Patch7:         %{name}-DESTDIR.patch
40 Patch8:         %{name}-wtmp.patch
41 Patch9:         %{name}-link.patch
42 Patch10:        %{name}-port-65535.patch
43 Patch11:        %{name}-vmail_crypt.patch
44 URL:            http://www.proftpd.org/
45 BuildRequires:  autoconf
46 BuildRequires:  libwrap-devel
47 %{?_with_mysql:BuildRequires:   mysql-devel}
48 %{?_with_ldap:BuildRequires:    openldap-devel}
49 %{?!_without_ssl:BuildRequires: openssl-devel >= 0.9.7}
50 %{?!_without_pam:BuildRequires: pam-devel}
51 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53 %define         _sysconfdir     /etc/ftpd
54 %define         _localstatedir  /var/run
55
56 %description
57 ProFTPD is a highly configurable ftp daemon for unix and unix-like
58 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
59 replacement for wu-ftpd. Full online documentation is available at
60 http://www.proftpd.org/, including a server configuration directive
61 reference manual.
62
63 %description -l es
64 ProFTPD es un servidor ftp altamente configurable para sistemas
65 operativos unix. Está proyectado para ser un substituto directo al
66 wu-ftpd. La documentación completa está disponible en
67 http://www.proftpd.org, incluido el manual de referencia para las
68 directivas de configuración del servidor.
69
70 %description -l pl
71 ProFTPD jest wysoce konfigurowalnym serwerem ftp dla systemów Unix.
72 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
73 dokunentacja jest dostêpna on-line pod http://www.proftpd.org/
74 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
75
76 %description -l pt_BR
77 O ProFTPD é um servidor ftp altamente configurável para sistemas
78 operacionais unix.
79
80 É projetado para ser um substituto direto para o wu-ftpd. A
81 documentação completa está disponível em http://www.proftpd.org,
82 incluindo o manual de referência para as diretivas de configuração do
83 servidor.
84
85 %package common
86 Summary:        PROfessional FTP Daemon with apache-like configuration syntax - common files
87 Summary(pl):    PROfesionalny serwer FTP  - wspólne pliki
88 Group:          Daemons
89 Requires(post): awk
90 Requires(post): fileutils
91 Requires:       logrotate
92 %{?!_without_pam:Requires:      pam >= 0.67}
93 Obsoletes:      proftpd < 0:1.2.2rc1-3
94
95 %description  common
96 ProFTPD is a highly configurable ftp daemon for unix and unix-like
97 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
98 replacement for wu-ftpd. Full online documentation is available at
99 http://www.proftpd.org/, including a server configuration directive
100 reference manual.
101
102 %description common -l pl
103 ProFTPD jest wysoce konfigurowalnym serwerem ftp dla systemów Unix.
104 ProFTPD jest robiony jako bezpo¶redni zamiennik wu-ftpd. Pe³na
105 dokunentacja jest dostêpna on-line pod http://www.proftpd.org/
106 w³±cznie z dokumentacj± dotycz±c± konfigurowania.
107
108 %package inetd
109 Summary:        inetd configs for proftpd
110 Summary(pl):    Pliki konfiguracyjne do u¿ycia proftpd poprzez inetd
111 Group:          Daemons
112 PreReq:         %{name}-common = %{epoch}:%{version}
113 PreReq:         rc-inetd
114 Requires(post): fileutils
115 Requires(post): grep
116 Requires(post): sed
117 Provides:       proftpd = %{epoch}:%{version}-%{release}
118 Provides:       ftpserver
119 Obsoletes:      proftpd-standalone
120 Obsoletes:      ftpserver
121 Obsoletes:      anonftp
122 Obsoletes:      bftpd
123 Obsoletes:      ftpd-BSD
124 Obsoletes:      heimdal-ftpd
125 Obsoletes:      linux-ftpd
126 Obsoletes:      muddleftpd
127 Obsoletes:      pure-ftpd
128 Obsoletes:      troll-ftpd
129 Obsoletes:      vsftpd
130 Obsoletes:      wu-ftpd
131 Conflicts:      man-pages < 1.51
132
133 %description inetd
134 ProFTPD configs for running from inetd.
135
136 %description inetd -l pl
137 Pliki konfiguracyjna ProFTPD do startowania demona poprzez inetd.
138
139 %package standalone
140 Summary:        standalone daemon configs for proftpd
141 Summary(pl):    Pliki konfiguracyjne do startowania proftpd w trybie standalone
142 Group:          Daemons
143 PreReq:         %{name}-common = %{version}
144 PreReq:         rc-scripts
145 Requires(post,preun):   /sbin/chkconfig
146 Requires(post): fileutils
147 Requires(post): grep
148 Requires(post): sed
149 Provides:       proftpd = %{epoch}:%{version}-%{release}
150 Provides:       ftpserver
151 Obsoletes:      proftpd-inetd
152 Obsoletes:      ftpserver
153 Obsoletes:      anonftp
154 Obsoletes:      bftpd
155 Obsoletes:      ftpd-BSD
156 Obsoletes:      heimdal-ftpd
157 Obsoletes:      linux-ftpd
158 Obsoletes:      muddleftpd
159 Obsoletes:      pure-ftpd
160 Obsoletes:      troll-ftpd
161 Obsoletes:      vsftpd
162 Obsoletes:      wu-ftpd
163 Conflicts:      man-pages < 1.51
164
165 %description standalone
166 ProFTPD configs for running as a standalone daemon.
167
168 %description standalone -l pl
169 Pliki konfiguracyjne ProFTPD do startowania demona w trybie
170 standalone.
171
172 %prep
173 %setup  -q
174 #%patch0 -p1
175 #%patch1 -p1
176 #%patch2 -p1
177 #%patch3 -p1
178 #%patch4 -p1
179 #%patch5 -p1
180 #%patch6 -p1
181 #%patch7 -p1
182 #%patch8 -p1
183 #%patch9 -p1
184 #%patch10 -p0
185 #%patch11 -p1
186 install -m644 %{SOURCE7} contrib/mod_tcpd.c
187
188 %build
189 %{__autoconf}
190 RUN_DIR=%{_localstatedir} ; export RUN_DIR
191 %configure \
192         --enable-autoshadow \
193         --with-modules=mod_ratio:mod_readme\
194         %{?_with_ldap::mod_ldap}\
195         %{?_with_quota::mod_quota}\
196         %{?_with_linuxprivs::mod_linuxprivs}\
197         %{?_with_mysql::mod_sql:mod_sql_mysql} \
198         %{?!_without_ipv6:--enable-ipv6}\
199         %{?_without_ssl:--disable-tls}\
200         --enable-sendfile
201 #       %{?!_without_pam::auth_mod_pam}\
202 #       %{?!_without_ipv6::mod_tcpd}\
203
204 %{__make}
205
206 %install
207 rm -rf $RPM_BUILD_ROOT
208
209 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,security,sysconfig/rc-inetd,rc.d/init.d} \
210         $RPM_BUILD_ROOT/{home/services/ftp/pub/Incoming,var/log}
211
212 %{__make} install DESTDIR=$RPM_BUILD_ROOT \
213         INSTALL_USER=`id -u` \
214         INSTALL_GROUP=`id -g`
215
216 rm -f $RPM_BUILD_ROOT%{_sbindir}/in.proftpd
217
218 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
219 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/ftpd
220 %{?!_without_pam:install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/ftp}
221 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/ftpd
222 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/proftpd
223 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/proftpd
224 install contrib/xferstats.holger-preiss $RPM_BUILD_ROOT%{_bindir}/xferstat
225
226 bzip2 -dc %{SOURCE8} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
227
228 mv -f contrib/README contrib/README.modules
229
230 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers.default
231 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers
232 :> $RPM_BUILD_ROOT/var/log/xferlog
233
234 ln -sf proftpd $RPM_BUILD_ROOT%{_sbindir}/ftpd
235
236 :> $RPM_BUILD_ROOT/etc/security/blacklist.ftp
237
238 %clean
239 rm -rf $RPM_BUILD_ROOT
240
241 %post common
242 umask 027
243 touch /var/log/xferlog
244 awk 'BEGIN { FS = ":" }; { if(($3 < 500)&&($1 != "ftp")) print $1; }' < /etc/passwd >> %{_sysconfdir}/ftpusers.default
245 if [ ! -f %{_sysconfdir}/ftpusers ]; then
246         cp -f %{_sysconfdir}/ftpusers.default %{_sysconfdir}/ftpusers
247 fi
248
249 %post inetd
250 umask 027
251 if grep -iEqs "^ServerType[[:space:]]+standalone" %{_sysconfdir}/proftpd.conf ; then
252         cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
253         sed -e "s/^ServerType[[:space:]]\+standalone/ServerType                 inetd/g" \
254                 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
255 fi
256 if [ -f /var/lock/subsys/rc-inetd ]; then
257         /etc/rc.d/init.d/rc-inetd reload 1>&2
258 else
259         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
260 fi
261
262 %postun inetd
263 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
264         /etc/rc.d/init.d/rc-inetd reload 1>&2
265 fi
266
267 %post standalone
268 /sbin/chkconfig --add proftpd
269 if grep -iEqs "^ServerType[[:space:]]+inetd" %{_sysconfdir}/proftpd.conf ; then
270         cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
271         sed -e "s/^ServerType[[:space:]]\+inetd/ServerType                      standalone/g" \
272                 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
273 fi
274 if [ -f /var/lock/subsys/proftpd ]; then
275         /etc/rc.d/init.d/proftpd restart 1>&2
276 else
277         echo "Run \"/etc/rc.d/init.d/proftpd start\" to start ProFTPD daemon."
278 fi
279
280 %preun standalone
281 if [ "$1" = "0" ]; then
282         if [ -f /var/lock/subsys/proftpd ]; then
283                 /etc/rc.d/init.d/proftpd stop 1>&2
284         fi
285         /sbin/chkconfig --del proftpd
286 fi
287
288 %files common
289 %defattr(644,root,root,755)
290 %doc sample-configurations/{virtual,anonymous}.conf ChangeLog README
291 %doc contrib/README.modules README.PAM
292 %doc README.mod_sql README.LDAP doc/*html
293
294 %attr(750,root,ftp) %dir %{_sysconfdir}
295 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
296 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/ftpusers
297 %attr(640,root,root) %{_sysconfdir}/ftpusers.default
298 %attr(640,root,root) /etc/logrotate.d/*
299 %attr(640,root,root) %ghost /var/log/*
300 %{?!_without_pam:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
301
302 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.ftp
303
304 %attr(755,root,root) %{_bindir}/*
305 %attr(755,root,root) %{_sbindir}/*
306
307 %{_mandir}/man[18]/*
308
309 %dir /home/services/ftp
310 %dir /home/services/ftp/pub
311 %attr(711,root,root) %dir /home/services/ftp/pub/Incoming
312
313 %files inetd
314 %defattr(644,root,root,755)
315 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/ftpd
316 %{_mandir}/man5/*
317 %lang(ja) %{_mandir}/ja/man5/ftpusers*
318 %lang(pl) %{_mandir}/pl/man5/ftpusers*
319 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
320 %lang(ru) %{_mandir}/ru/man5/ftpusers*
321
322 %files standalone
323 %defattr(644,root,root,755)
324 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/proftpd
325 %attr(754,root,root) /etc/rc.d/init.d/proftpd
326 %{_mandir}/man5/*
327 %lang(ja) %{_mandir}/ja/man5/ftpusers*
328 %lang(pl) %{_mandir}/pl/man5/ftpusers*
329 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
330 %lang(ru) %{_mandir}/ru/man5/ftpusers*
This page took 0.062969 seconds and 2 git commands to generate.