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