]> git.pld-linux.org Git - packages/proftpd.git/blob - proftpd.spec
- security update to 1.2.10rc3
[packages/proftpd.git] / proftpd.spec
1 #
2 # Conditional build:
3 %bcond_without  pam             # disable PAM support
4 %bcond_without  ipv6            # disable IPv6 and TCPD support
5 %bcond_without  ssl             # disbale TLS/SSL support
6 %bcond_with     ldap            # enable LDAP support
7 %bcond_with     mysql           # enable MySQL support
8 %bcond_with     pgsql           # enable PostgreSQL support
9 %bcond_with     quota           # enable quota support
10 %bcond_with     linuxprivs      # enable libcap support
11 #
12 %define         _rc     rc3
13 Summary:        PROfessional FTP Daemon with apache-like configuration syntax
14 Summary(es):    Servidor FTP profesional, con sintaxis de configuración semejante a la del apache
15 Summary(pl):    PROfesionalny serwer FTP
16 Summary(pt_BR): Servidor FTP profissional, com sintaxe de configuração semelhante à do apache
17 Summary(zh_CN): Ò×ÓÚ¹ÜÀíµÄ,°²È«µÄ FTP ·þÎñÆ÷
18 Name:           proftpd
19 Version:        1.2.10
20 Release:        0.%{_rc}.1
21 Epoch:          1
22 License:        GPL v2+
23 Group:          Daemons
24 Source0:        ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}%{_rc}.tar.bz2
25 # Source0-md5:  d834bb822816a2ce483cc2ef1a9533e7
26 Source1:        %{name}.conf
27 Source2:        %{name}.logrotate
28 Source3:        ftp.pamd
29 Source4:        %{name}.inetd
30 Source5:        %{name}.sysconfig
31 Source6:        %{name}.init
32 Source7:        ftpusers.tar.bz2
33 # Source7-md5:  76c80b6ec9f4d079a1e27316edddbe16
34 Patch0:         %{name}-umode_t.patch
35 Patch1:         %{name}-glibc.patch
36 Patch2:         %{name}-paths.patch
37 Patch3:         %{name}-noautopriv.patch
38 Patch4:         %{name}-wtmp.patch
39 Patch5:         %{name}-vmail.patch
40 Patch6:         %{name}-IPv6.patch
41 URL:            http://www.proftpd.org/
42 BuildRequires:  autoconf
43 BuildRequires:  automake
44 BuildRequires:  libwrap-devel
45 %{?with_mysql:BuildRequires:    mysql-devel}
46 BuildRequires:  ncurses-devel
47 %{?with_ldap:BuildRequires:     openldap-devel}
48 %{?with_ssl:BuildRequires:      openssl-devel >= 0.9.7d}
49 %{?with_pam:BuildRequires:      pam-devel}
50 %{?with_pgsql:BuildRequires:    postgresql-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 %{?with_pam:Requires:   pam >= 0.77.3}
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:      glftpd
125 Obsoletes:      heimdal-ftpd
126 Obsoletes:      linux-ftpd
127 Obsoletes:      muddleftpd
128 Obsoletes:      pure-ftpd
129 Obsoletes:      troll-ftpd
130 Obsoletes:      vsftpd
131 Obsoletes:      wu-ftpd
132 Conflicts:      man-pages < 1.51
133
134 %description inetd
135 ProFTPD configs for running from inetd.
136
137 %description inetd -l pl
138 Pliki konfiguracyjna ProFTPD do startowania demona poprzez inetd.
139
140 %package standalone
141 Summary:        Standalone daemon configs for proftpd
142 Summary(pl):    Pliki konfiguracyjne do startowania proftpd w trybie standalone
143 Group:          Daemons
144 PreReq:         %{name}-common = %{epoch}:%{version}
145 PreReq:         rc-scripts
146 Requires(post,preun):   /sbin/chkconfig
147 Requires(post): fileutils
148 Requires(post): grep
149 Requires(post): sed
150 Provides:       proftpd = %{epoch}:%{version}-%{release}
151 Provides:       ftpserver
152 Obsoletes:      proftpd-inetd
153 Obsoletes:      ftpserver
154 Obsoletes:      anonftp
155 Obsoletes:      bftpd
156 Obsoletes:      ftpd-BSD
157 Obsoletes:      glftpd
158 Obsoletes:      heimdal-ftpd
159 Obsoletes:      linux-ftpd
160 Obsoletes:      muddleftpd
161 Obsoletes:      pure-ftpd
162 Obsoletes:      troll-ftpd
163 Obsoletes:      vsftpd
164 Obsoletes:      wu-ftpd
165 Conflicts:      man-pages < 1.51
166
167 %description standalone
168 ProFTPD configs for running as a standalone daemon.
169
170 %description standalone -l pl
171 Pliki konfiguracyjne ProFTPD do startowania demona w trybie
172 standalone.
173
174 %prep
175 %setup  -q -n %{name}-%{version}%{_rc}
176 %patch0 -p1
177 %patch1 -p1
178 %patch2 -p1
179 %patch3 -p1
180 %patch4 -p1
181 #%patch5 -p1
182 # IPv6 support needs major update
183 #patch6 -p1
184
185 %build
186 cp -f /usr/share/automake/config.sub .
187 %{__autoconf}
188 RUN_DIR=%{_localstatedir} ; export RUN_DIR
189 CFLAGS="%{rpmcflags} -I/usr/include/ncurses"
190 CPPFLAGS="%{rpmcflags} -I/usr/include/ncurses"
191 %configure \
192         --enable-autoshadow \
193         --with-modules=mod_ratio:mod_readme%{?with_ssl::mod_tls}%{?with_ipv6::mod_wrap}%{?with_pam::mod_auth_pam}%{?with_ldap::mod_ldap}%{?with_quota::mod_quota}%{?with_linuxprivs::mod_linuxprivs}%{?with_mysql::mod_sql:mod_sql_mysql}%{?with_pgsql::mod_sql:mod_sql_postgres} \
194         %{?with_ipv6:--enable-ipv6} \
195         %{!?with_ssl:--disable-tls} \
196         --enable-sendfile
197
198 %{__make}
199
200 %install
201 rm -rf $RPM_BUILD_ROOT
202
203 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,pam.d,security,sysconfig/rc-inetd,rc.d/init.d} \
204         $RPM_BUILD_ROOT/var/{lib/ftp/pub/Incoming,log}
205
206 %{__make} install DESTDIR=$RPM_BUILD_ROOT \
207         INSTALL_USER=`id -u` \
208         INSTALL_GROUP=`id -g`
209
210 rm -f $RPM_BUILD_ROOT%{_sbindir}/in.proftpd
211
212 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
213 install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/ftpd
214 %{?with_pam:install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/ftp}
215 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/ftpd
216 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/proftpd
217 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/proftpd
218 install contrib/xferstats.holger-preiss $RPM_BUILD_ROOT%{_bindir}/xferstat
219
220 bzip2 -dc %{SOURCE7} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
221
222 mv -f contrib/README contrib/README.modules
223
224 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers.default
225 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers
226 :> $RPM_BUILD_ROOT/var/log/xferlog
227
228 ln -sf proftpd $RPM_BUILD_ROOT%{_sbindir}/ftpd
229
230 :> $RPM_BUILD_ROOT/etc/security/blacklist.ftp
231
232 %clean
233 rm -rf $RPM_BUILD_ROOT
234
235 %post common
236 umask 027
237 touch /var/log/xferlog
238 awk 'BEGIN { FS = ":" }; { if(($3 < 500)&&($1 != "ftp")) print $1; }' < /etc/passwd >> %{_sysconfdir}/ftpusers.default
239 if [ ! -f %{_sysconfdir}/ftpusers ]; then
240         cp -f %{_sysconfdir}/ftpusers.default %{_sysconfdir}/ftpusers
241 fi
242
243 %post inetd
244 umask 027
245 if grep -iEqs "^ServerType[[:space:]]+standalone" %{_sysconfdir}/proftpd.conf ; then
246         cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
247         sed -e "s/^ServerType[[:space:]]\+standalone/ServerType                 inetd/g" \
248                 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
249 fi
250 if [ -f /var/lock/subsys/rc-inetd ]; then
251         /etc/rc.d/init.d/rc-inetd reload 1>&2
252 else
253         echo "Type \"/etc/rc.d/init.d/rc-inetd start\" to start inet server" 1>&2
254 fi
255
256 %postun inetd
257 if [ "$1" = "0" -a -f /var/lock/subsys/rc-inetd ]; then
258         /etc/rc.d/init.d/rc-inetd reload 1>&2
259 fi
260
261 %post standalone
262 /sbin/chkconfig --add proftpd
263 if grep -iEqs "^ServerType[[:space:]]+inetd" %{_sysconfdir}/proftpd.conf ; then
264         cp -a %{_sysconfdir}/proftpd.conf %{_sysconfdir}/proftpd.conf.rpmorig
265         sed -e "s/^ServerType[[:space:]]\+inetd/ServerType                      standalone/g" \
266                 %{_sysconfdir}/proftpd.conf.rpmorig >%{_sysconfdir}/proftpd.conf
267 fi
268 if [ -f /var/lock/subsys/proftpd ]; then
269         /etc/rc.d/init.d/proftpd restart 1>&2
270 else
271         echo "Run \"/etc/rc.d/init.d/proftpd start\" to start ProFTPD daemon."
272 fi
273
274 %preun standalone
275 if [ "$1" = "0" ]; then
276         if [ -f /var/lock/subsys/proftpd ]; then
277                 /etc/rc.d/init.d/proftpd stop 1>&2
278         fi
279         /sbin/chkconfig --del proftpd
280 fi
281
282 %files common
283 %defattr(644,root,root,755)
284 %doc sample-configurations/*.conf CREDITS ChangeLog NEWS
285 %doc README README.LDAP README.PAM README.capabilities README.modules
286 %doc doc/*html contrib/*.html
287
288 %attr(750,root,ftp) %dir %{_sysconfdir}
289 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
290 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/ftpusers
291 %attr(640,root,root) %{_sysconfdir}/ftpusers.default
292 %attr(640,root,root) /etc/logrotate.d/*
293 %attr(640,root,root) %ghost /var/log/*
294 %{?with_pam:%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*}
295
296 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.ftp
297
298 %attr(755,root,root) %{_bindir}/*
299 %attr(755,root,root) %{_sbindir}/*
300
301 %{_mandir}/man[18]/*
302
303 %dir /var/lib/ftp
304 %dir /var/lib/ftp/pub
305 %attr(711,ftp,ftp) %dir /var/lib/ftp/pub/Incoming
306
307 %files inetd
308 %defattr(644,root,root,755)
309 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/ftpd
310 %{_mandir}/man5/*
311 %lang(ja) %{_mandir}/ja/man5/ftpusers*
312 %lang(pl) %{_mandir}/pl/man5/ftpusers*
313 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
314 %lang(ru) %{_mandir}/ru/man5/ftpusers*
315
316 %files standalone
317 %defattr(644,root,root,755)
318 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/proftpd
319 %attr(754,root,root) /etc/rc.d/init.d/proftpd
320 %{_mandir}/man5/*
321 %lang(ja) %{_mandir}/ja/man5/ftpusers*
322 %lang(pl) %{_mandir}/pl/man5/ftpusers*
323 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
324 %lang(ru) %{_mandir}/ru/man5/ftpusers*
This page took 0.060345 seconds and 4 git commands to generate.