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