]> git.pld-linux.org Git - packages/proftpd.git/blob - proftpd.spec
- fixed Group
[packages/proftpd.git] / proftpd.spec
1 # TODO
2 # - mod_caps uses uname -r for detection
3 # - don't use internal libltdl
4 #
5 # Conditional build:
6 %bcond_without  pam             # disable PAM support
7 %bcond_without  ipv6            # disable IPv6 and TCPD support
8 %bcond_without  ssl             # disbale TLS/SSL support
9 %bcond_without  ldap            # disable LDAP support
10 %bcond_without  mysql           # disable MySQL support
11 %bcond_without  pgsql           # disable PostgreSQL support
12 %bcond_without  quotafile       # disable quota file support
13 %bcond_without  quotaldap       # disable quota ldap support
14 %bcond_without  quotamysql      # disable quota mysql support
15 %bcond_without  quotapgsql      # disable quota pgsql support
16 #
17 Summary:        PROfessional FTP Daemon with apache-like configuration syntax
18 Summary(es.UTF-8):      Servidor FTP profesional, con sintaxis de configuración semejante a la del apache
19 Summary(pl.UTF-8):      PROfesionalny serwer FTP
20 Summary(pt_BR.UTF-8):   Servidor FTP profissional, com sintaxe de configuração semelhante à do apache
21 Summary(zh_CN.UTF-8):   易于管理的,安全的 FTP 服务器
22 Name:           proftpd
23 Version:        1.3.2e
24 Release:        1
25 Epoch:          2
26 License:        GPL v2+
27 Group:          Networking/Daemons
28 Source0:        ftp://ftp.proftpd.org/distrib/source/%{name}-%{version}.tar.bz2
29 # Source0-md5:  018e0eb1757d9cea2a0e17f2c9b1ca2d
30 Source1:        %{name}.conf
31 Source3:        ftp.pamd
32 Source4:        %{name}.inetd
33 Source5:        %{name}.sysconfig
34 Source6:        %{name}.init
35 Source7:        ftpusers.tar.bz2
36 # Source7-md5:  76c80b6ec9f4d079a1e27316edddbe16
37 Source9:        %{name}-mod_pam.conf
38 Source10:       %{name}-mod_tls.conf
39 Source11:       %{name}-anonftp.conf
40 Patch0:         %{name}-paths.patch
41 Patch1:         %{name}-noautopriv.patch
42 Patch2:         %{name}-wtmp.patch
43 Patch3:         %{name}-pool.patch
44 Patch4:         %{name}-nostrip.patch
45 URL:            http://www.proftpd.org/
46 BuildRequires:  acl-devel
47 BuildRequires:  autoconf
48 BuildRequires:  automake
49 BuildRequires:  libcap-devel
50 BuildRequires:  libstdc++-devel
51 BuildRequires:  libwrap-devel
52 %if %{with mysql} || %{with quotamysql}
53 BuildRequires:  mysql-devel
54 %endif
55 BuildRequires:  ncurses-devel
56 %if %{with ldap} || %{with quotaldap}
57 BuildRequires:  openldap-devel
58 %endif
59 %{?with_ssl:BuildRequires:      openssl-devel >= 0.9.7d}
60 %{?with_pam:BuildRequires:              pam-devel}
61 %if %{with pgsql} || %{with quotapgsql}
62 BuildRequires:  postgresql-devel
63 %endif
64 BuildRequires:  rpmbuild(macros) >= 1.268
65 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
66
67 %define         _sysconfdir             /etc/ftpd
68 %define         _localstatedir          /var/run
69 %define         _libexecdir             %{_prefix}/%{_lib}/%{name}
70
71 %description
72 ProFTPD is a highly configurable FTP daemon for Unix and Unix-like
73 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
74 replacement for wu-ftpd. Full online documentation is available at
75 <http://www.proftpd.org/>, including a server configuration directive
76 reference manual.
77
78 %description -l es.UTF-8
79 ProFTPD es un servidor FTP altamente configurable para sistemas
80 operativos Unix. Está proyectado para ser un substituto directo al
81 wu-ftpd. La documentación completa está disponible en
82 <http://www.proftpd.org/>, incluido el manual de referencia para las
83 directivas de configuración del servidor.
84
85 %description -l pl.UTF-8
86 ProFTPD jest wysoce konfigurowalnym serwerem FTP dla systemów Unix.
87 ProFTPD jest robiony jako bezpośredni zamiennik wu-ftpd. Pełna
88 dokumentacja jest dostępna on-line pod <http://www.proftpd.org/>
89 włącznie z dokumentacją dotyczącą konfigurowania.
90
91 %description -l pt_BR.UTF-8
92 O ProFTPD é um servidor FTP altamente configurável para sistemas
93 operacionais Unix.
94
95 É projetado para ser um substituto direto para o wu-ftpd. A
96 documentação completa está disponível em <http://www.proftpd.org/>,
97 incluindo o manual de referência para as diretivas de configuração do
98 servidor.
99
100 %package common
101 Summary:        PROfessional FTP Daemon with apache-like configuration syntax - common files
102 Summary(pl.UTF-8):      PROfesionalny serwer FTP - wspólne pliki
103 Group:          Networking/Daemons
104 Requires(post): awk
105 Requires(post): fileutils
106 Obsoletes:      proftpd < 0:1.2.2rc1-3
107
108 %description common
109 ProFTPD is a highly configurable FTP daemon for Unix and Unix-like
110 operating systems. ProFTPD is designed to be somewhat of a "drop-in"
111 replacement for wu-ftpd. Full online documentation is available at
112 <http://www.proftpd.org/>, including a server configuration directive
113 reference manual.
114
115 %description common -l es.UTF-8
116 ProFTPD es un servidor FTP altamente configurable para sistemas
117 operativos Unix. Está proyectado para ser un substituto directo al
118 wu-ftpd. La documentación completa está disponible en
119 <http://www.proftpd.org/>, incluido el manual de referencia para las
120 directivas de configuración del servidor.
121
122 %description common -l pl.UTF-8
123 ProFTPD jest wysoce konfigurowalnym serwerem FTP dla systemów Unix.
124 ProFTPD jest robiony jako bezpośredni zamiennik wu-ftpd. Pełna
125 dokumentacja jest dostępna on-line pod <http://www.proftpd.org/>
126 włącznie z dokumentacją dotyczącą konfigurowania.
127
128 %description common -l pt_BR.UTF-8
129 O ProFTPD é um servidor FTP altamente configurável para sistemas
130 operacionais Unix.
131
132 É projetado para ser um substituto direto para o wu-ftpd. A
133 documentação completa está disponível em <http://www.proftpd.org/>,
134 incluindo o manual de referência para as diretivas de configuração do
135 servidor.
136
137 %package inetd
138 Summary:        inetd configs for proftpd
139 Summary(pl.UTF-8):      Pliki konfiguracyjne do użycia proftpd poprzez inetd
140 Group:          Networking/Daemons
141 Requires(post): fileutils
142 Requires(post): grep
143 Requires(post): sed >= 4.0
144 Requires(triggerpostun):        sed >= 4.0
145 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
146 Requires:       rc-inetd
147 Provides:       ftpserver
148 Provides:       proftpd = %{epoch}:%{version}-%{release}
149 Obsoletes:      anonftp
150 Obsoletes:      bftpd
151 Obsoletes:      ftpd-BSD
152 Obsoletes:      ftpserver
153 Obsoletes:      glftpd
154 Obsoletes:      heimdal-ftpd
155 Obsoletes:      krb5-ftpd
156 Obsoletes:      linux-ftpd
157 Obsoletes:      muddleftpd
158 Obsoletes:      proftpd-standalone
159 Obsoletes:      pure-ftpd
160 Obsoletes:      troll-ftpd
161 Obsoletes:      vsftpd
162 Obsoletes:      wu-ftpd
163 Conflicts:      man-pages < 1.51
164 Conflicts:      rpm < 4.4.2-0.2
165
166 %description inetd
167 ProFTPD configs for running from inetd.
168
169 %description inetd -l pl.UTF-8
170 Pliki konfiguracyjna ProFTPD do startowania demona poprzez inetd.
171
172 %package standalone
173 Summary:        Standalone daemon configs for proftpd
174 Summary(pl.UTF-8):      Pliki konfiguracyjne do startowania proftpd w trybie standalone
175 Group:          Networking/Daemons
176 Requires(post): fileutils
177 Requires(post): grep
178 Requires(post): sed >= 4.0
179 Requires(post,preun):   /sbin/chkconfig
180 Requires(triggerpostun):        sed >= 4.0
181 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
182 Requires:       rc-scripts
183 Provides:       ftpserver
184 Provides:       proftpd = %{epoch}:%{version}-%{release}
185 Obsoletes:      anonftp
186 Obsoletes:      bftpd
187 Obsoletes:      ftpd-BSD
188 Obsoletes:      ftpserver
189 Obsoletes:      glftpd
190 Obsoletes:      heimdal-ftpd
191 Obsoletes:      krb5-ftpd
192 Obsoletes:      linux-ftpd
193 Obsoletes:      muddleftpd
194 Obsoletes:      proftpd-inetd
195 Obsoletes:      pure-ftpd
196 Obsoletes:      troll-ftpd
197 Obsoletes:      vsftpd
198 Obsoletes:      wu-ftpd
199 Conflicts:      man-pages < 1.51
200 Conflicts:      rpm < 4.4.2-0.2
201
202 %description standalone
203 ProFTPD configs for running as a standalone daemon.
204
205 %description standalone -l pl.UTF-8
206 Pliki konfiguracyjne ProFTPD do startowania demona w trybie
207 standalone.
208
209 %package devel
210 Summary:        Header files ProFTPD
211 Summary(pl.UTF-8):      Pliki nagłówkowe ProFTPD
212 Group:          Development/Libraries
213 Requires:       acl-devel
214
215 %description devel
216 This is the package containing the header files for ProFTPD.
217
218 %description devel -l pl.UTF-8
219 Ten pakiet zawiera pliki nagłówkowe ProFTPD
220
221 %package anonftp
222 Summary:        Anonymous FTP config for ProFTPD
223 Summary(pl.UTF-8):      Konfiguracja anonimowego FTP dla ProFTPD
224 Group:          Networking/Daemons
225 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
226
227 %description anonftp
228 Anonymous FTP config for ProFTPD.
229
230 %description anonftp -l pl.UTF-8
231 Konfiguracja anonimowego FTP dla ProFTPD.
232
233 %package mod_auth_pam
234 Summary:        ProFTPD PAM auth module
235 Summary(pl.UTF-8):      Moduł uwierzytelnienia PAM dla ProFTPD
236 Group:          Networking/Daemons
237 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
238 Requires:       pam >= 0.79.0
239
240 %description mod_auth_pam
241 PAM authentication method for ProFTPD.
242
243 %description mod_auth_pam -l pl.UTF-8
244 Metoda uwierzytelnienia PAM dla ProFTPD.
245
246 %package mod_ldap
247 Summary:        ProFTPD OpenLDAP module
248 Summary(pl.UTF-8):      Moduł OpenLDAP dla ProFTPD
249 Group:          Networking/Daemons
250 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
251
252 %description mod_ldap
253 mod_ldap provides LDAP authentication support for ProFTPD. It supports
254 many features useful in "toaster" environments such as default UID/GID
255 and autocreation/autogeneration of home directories.
256
257 %description mod_ldap -l pl.UTF-8
258 mod_ldap dodaje obsługę uwierzytelnienia LDAP do ProFTPD. Obsługuje
259 wiele cech przydatnych w środowiskach "tosterowych", takich jak
260 domyślny UID/GID i automatyczne tworzenie/generowanie katalogów
261 domowych.
262
263 %package mod_quotatab
264 Summary:        ProFTPD quotatab module
265 Summary(pl.UTF-8):      Moduł quotatab dla ProFTPD
266 Group:          Networking/Daemons
267 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
268
269 %description mod_quotatab
270 A module for managing FTP byte/file quotas via centralized tables.
271
272 %description mod_quotatab -l pl.UTF-8
273 Moduł do zarządzania ograniczeniami bajtów/plików FTP poprzez
274 scentralizowane tabele.
275
276 %package mod_quotatab_file
277 Summary:        ProFTPD quotatab file module
278 Summary(pl.UTF-8):      Moduł quotatab_file dla ProFTPD
279 Group:          Networking/Daemons
280 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
281 Requires:       %{name}-mod_quotatab = %{epoch}:%{version}-%{release}
282
283 %description mod_quotatab_file
284 A mod_quotatab sub-module for managing quota data via file-based
285 tables.
286
287 %description mod_quotatab_file -l pl.UTF-8
288 Podmoduł mod_quotatab do zarządzania danymi o ograniczeniach poprzez
289 tabele zapisane w pliku.
290
291 %package mod_quotatab_ldap
292 Summary:        ProFTPD quotatab ldap module
293 Summary(pl.UTF-8):      Moduł quotatab_ldap dla ProFTPD
294 Group:          Networking/Daemons
295 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
296 Requires:       %{name}-mod_ldap = %{epoch}:%{version}-%{release}
297 Requires:       %{name}-mod_quotatab = %{epoch}:%{version}-%{release}
298
299 %description mod_quotatab_ldap
300 A mod_quotatab sub-module for obtaining quota information from an LDAP
301 directory.
302
303 %description mod_quotatab_ldap -l pl.UTF-8
304 Podmoduł mod_quotatab do pobierania informacji o ograniczeniach z
305 katalogu LDAP.
306
307 %package mod_quotatab_sql
308 Summary:        ProFTPD quotatab sql module
309 Summary(pl.UTF-8):      Moduł quotatab_sql dla ProFTPD
310 Group:          Networking/Daemons
311 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
312 Requires:       %{name}-mod_quotatab = %{epoch}:%{version}-%{release}
313 Requires:       %{name}-mod_sql = %{epoch}:%{version}-%{release}
314
315 %description mod_quotatab_sql
316 A mod_quotatab sub-module for managing quota data via SQL-based
317 tables.
318
319 %description mod_quotatab_sql -l pl.UTF-8
320 Podmoduł mod_quotatab do zarządzania danymi o ograniczeniach poprzez
321 tabele SQL.
322
323 %package mod_ratio
324 Summary:        ProFTPD ratio module
325 Summary(pl.UTF-8):      Moduł ratio dla ProFTPD
326 Group:          Networking/Daemons
327 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
328
329 %description mod_ratio
330 Support upload/download ratios.
331
332 %description mod_ratio -l pl.UTF-8
333 Obsługa współczynników upload/download.
334
335 %package mod_readme
336 Summary:        ProFTPD readme module
337 Summary(pl.UTF-8):      Moduł readme dla ProFTPD
338 Group:          Networking/Daemons
339 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
340
341 %description mod_readme
342 "README" file support.
343
344 %description mod_readme -l pl.UTF-8
345 Obsługa pliku "README".
346
347 %package mod_rewrite
348 Summary:        ProFTPD rewrite module
349 Summary(pl.UTF-8):      Moduł rewrite dla ProFTPD
350 Group:          Networking/Daemons
351 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
352
353 %description mod_rewrite
354 Runtime rewrite engine.
355
356 %description mod_rewrite -l pl.UTF-8
357 Silnik przepisujący adresy w locie.
358
359 %package mod_sql
360 Summary:        ProFTPD SQL support module
361 Summary(pl.UTF-8):      Moduł obsługi SQL dla ProFTPD
362 Group:          Networking/Daemons
363 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
364
365 %description mod_sql
366 This module provides the necessary support for SQL based
367 authentication, logging and other features as required.
368
369 %description mod_sql -l pl.UTF-8
370 Ten moduł dodaje obsługę SQL potrzebną do uwierzytelniania, logowania
371 i innych możliwości opartych o SQL.
372
373 %package mod_sql_mysql
374 Summary:        ProFTPD sql mysql module
375 Summary(pl.UTF-8):      Moduł sql_mysql dla ProFTPD
376 Group:          Networking/Daemons
377 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
378 Requires:       %{name}-mod_sql = %{epoch}:%{version}-%{release}
379
380 %description mod_sql_mysql
381 Support for connecting to MySQL databases.
382
383 %description mod_sql_mysql -l pl.UTF-8
384 Obsługa łączenia się z bazami danych MySQL.
385
386 %package mod_sql_postgres
387 Summary:        ProFTPD sql postgres module
388 Summary(pl.UTF-8):      Moduł sql_postgres dla ProFTPD
389 Group:          Networking/Daemons
390 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
391 Requires:       %{name}-mod_sql = %{epoch}:%{version}-%{release}
392
393 %description mod_sql_postgres
394 Support for connecting to PostgreSQL databases.
395
396 %description mod_sql_postgres -l pl.UTF-8
397 Obsługa łączenia się z bazami danych PostgreSQL.
398
399 %package mod_tls
400 Summary:        ProFTPD TLS support
401 Summary(pl.UTF-8):      Obsługa TLS dla ProFTPD
402 Group:          Networking/Daemons
403 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
404
405 %description mod_tls
406 An RFC2228 SSL/TLS module for ProFTPD.
407
408 %description mod_tls -l pl.UTF-8
409 Moduł SSL/TLS zgodny z RFC2228 dla ProFTPD.
410
411 %package mod_wrap
412 Summary:        ProFTPD interface to libwrap
413 Summary(pl.UTF-8):      Interfejs ProFTPD do libwrap
414 Group:          Networking/Daemons
415 Requires:       %{name}-common = %{epoch}:%{version}-%{release}
416 Requires:       libwrap
417
418 %description mod_wrap
419 It enables the daemon to use the common tcpwrappers access control
420 library while in standalone mode, and in a very configurable manner.
421
422 Many programs will automatically add entries in the common allow/deny
423 files, and use of this module will allow a ProFTPD daemon running in
424 standalone mode to adapt as these entries are added. The portsentry
425 program does this, for example: when illegal access is attempted, it
426 will add hosts to the /etc/hosts.deny file.
427
428 %description mod_wrap -l pl.UTF-8
429 Ten pakiet pozwala demonowi używać wspólnej biblioteki kontroli
430 dostępu tcpwrappers w trybie samodzielnym w bardzo wygodny sposób.
431
432 Wiele programów automatycznie dodaje wpisy we wspólnych plikach
433 allow/deny, a użycie tego modułu pozwala demonowi ProFTPD działającemu
434 w trybie samodzielnym adaptować te wpisy w miarę dodawania. Robi tak
435 na przykład program portsentry: przy próbie niedozwolonego dostępu
436 dodaje hosty do pliku /etc/hosts.deny.
437
438 %prep
439 %setup -q -n %{name}-%{version}%{?_rc}
440 %patch0 -p1
441 %patch1 -p1
442 %patch2 -p1
443 %patch3 -p1
444 %patch4 -p1
445
446 cp -f /usr/share/automake/config.sub .
447
448 # cleanup backups after patching
449 find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
450
451 %build
452 %{__autoconf}
453
454 MODULES="
455 mod_auth_file
456 mod_ident
457 mod_ratio
458 mod_readme
459 mod_rewrite
460 mod_wrap
461 mod_facl
462 mod_ifsession
463 mod_lang
464 %{?with_ssl:mod_tls}
465 %{?with_pam:mod_auth_pam}
466 %{?with_ldap:mod_ldap}
467 %{?with_quotafile:mod_quotatab mod_quotatab_file}
468 %{?with_quotaldap:mod_quotatab mod_quotatab_ldap}
469 %{?with_quotamysql:mod_quotatab mod_quotatab_sql}
470 %{?with_quotapgsql:mod_quotatab mod_quotatab_sql}
471 %{?with_mysql:mod_sql mod_sql_mysql}
472 %{?with_pgsql:mod_sql mod_sql_postgres}
473 "
474
475 MODARG=$(echo $MODULES | tr ' ' '\n' | sort -u | xargs | tr ' ' ':')
476 %configure \
477         --with-includes=/usr/include/ncurses%{?with_mysql::%{_includedir}/mysql} \
478         --disable-auth-file \
479         --enable-autoshadow \
480         --enable-ctrls \
481         --enable-dso \
482         %{?with_ipv6:--enable-ipv6} \
483         --enable-sendfile \
484         %{!?with_ssl:--disable-tls} \
485         --with-shared=$MODARG \
486
487 %{__make} -j1
488
489 %install
490 rm -rf $RPM_BUILD_ROOT
491 install -d $RPM_BUILD_ROOT/etc/{pam.d,security,sysconfig/rc-inetd,rc.d/init.d} \
492         $RPM_BUILD_ROOT/var/{lib/ftp/pub/Incoming,log} \
493         $RPM_BUILD_ROOT%{_sysconfdir}/conf.d \
494         $RPM_BUILD_ROOT%{_includedir}/%{name}
495
496 %{__make} install \
497         DESTDIR=$RPM_BUILD_ROOT \
498         INSTALL_USER=%(id -u) \
499         INSTALL_GROUP=%(id -g)
500
501 rm $RPM_BUILD_ROOT%{_sbindir}/in.proftpd
502
503 install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
504 install %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/mod_auth_pam.conf
505 MODULES="
506 mod_auth_file
507 mod_ident
508 mod_ratio
509 mod_readme
510 mod_rewrite
511 mod_wrap
512 %{?with_ldap:mod_ldap}
513 %{?with_quotafile:mod_quotatab mod_quotatab_file}
514 %{?with_quotaldap:mod_quotatab mod_quotatab_ldap}
515 %{?with_quotamysql:mod_quotatab mod_quotatab_sql}
516 %{?with_quotapgsql:mod_quotatab mod_quotatab_sql}
517 %{?with_mysql:mod_sql mod_sql_mysql}
518 %{?with_pgsql:mod_sql mod_sql_postgres}
519 "
520 for module in $MODULES; do
521         echo "LoadModule        $module.c" > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/$module.conf
522 done
523 install %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/mod_tls.conf
524 install %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/anonftp.conf
525
526 %{?with_pam:install %{SOURCE3} $RPM_BUILD_ROOT/etc/pam.d/ftp}
527 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/rc-inetd/ftpd
528 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/proftpd
529 install %{SOURCE6} $RPM_BUILD_ROOT/etc/rc.d/init.d/proftpd
530 install contrib/xferstats.holger-preiss $RPM_BUILD_ROOT%{_bindir}/xferstat
531
532 bzip2 -dc %{SOURCE7} | tar xf - -C $RPM_BUILD_ROOT%{_mandir}
533
534 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers.default
535 :> $RPM_BUILD_ROOT%{_sysconfdir}/ftpusers
536
537 # only for -inetd package?
538 ln -sf proftpd $RPM_BUILD_ROOT%{_sbindir}/ftpd
539
540 :> $RPM_BUILD_ROOT/etc/security/blacklist.ftp
541
542 rm $RPM_BUILD_ROOT%{_libexecdir}/*.a
543 rm $RPM_BUILD_ROOT%{_libexecdir}/*.la
544
545 rm -f $RPM_BUILD_ROOT%{_mandir}/ftpusers-path.diff*
546 cp -aL include/* config.h $RPM_BUILD_ROOT%{_includedir}/%{name}
547
548 %clean
549 rm -rf $RPM_BUILD_ROOT
550
551 %post common
552 umask 027
553 awk -F: '{ if (($3 < 500) && ($1 != "ftp")) print $1; }' < /etc/passwd >> %{_sysconfdir}/ftpusers.default
554 if [ ! -f %{_sysconfdir}/ftpusers ]; then
555         cp -f %{_sysconfdir}/ftpusers.default %{_sysconfdir}/ftpusers
556 fi
557
558 %posttrans inetd
559 if grep -iEqs "^ServerType[[:space:]]+standalone" %{_sysconfdir}/proftpd.conf ; then
560         cp -f %{_sysconfdir}/proftpd.conf{,.rpmorig}
561         sed -i -e 's/^ServerType[[:space:]]\+standalone/ServerType                      inetd/g' %{_sysconfdir}/proftpd.conf
562 fi
563 %service -q rc-inetd reload
564
565 %postun inetd
566 if [ "$1" = "0" ]; then
567         %service -q rc-inetd reload
568 fi
569
570 %posttrans standalone
571 if grep -iEqs "^ServerType[[:space:]]+inetd" %{_sysconfdir}/proftpd.conf ; then
572         cp -f %{_sysconfdir}/proftpd.conf{,.rpmorig}
573         sed -i -e 's/^ServerType[[:space:]]\+inetd/ServerType                   standalone/g' %{_sysconfdir}/proftpd.conf
574 fi
575 /sbin/chkconfig --add proftpd
576 %service proftpd restart "ProFTPD daemon"
577
578 %preun standalone
579 if [ "$1" = "0" ]; then
580         %service proftpd stop
581         /sbin/chkconfig --del proftpd
582 fi
583
584 # macro called at module post scriptlet
585 %define module_post \
586 if [ "$1" = "1" ]; then \
587         if grep -iEqs "^ServerType[[:space:]]+inetd" %{_sysconfdir}/proftpd.conf; then \
588                 %service -q rc-inetd reload \
589         elif grep -iEqs "^ServerType[[:space:]]+standalone" %{_sysconfdir}/proftpd.conf; then \
590                 %service -q proftpd restart \
591         fi \
592 fi
593
594 # macro called at module postun scriptlet
595 %define module_postun \
596 if [ "$1" = "0" ]; then \
597         if grep -iEqs "^ServerType[[:space:]]+inetd" %{_sysconfdir}/proftpd.conf; then \
598                 %service -q rc-inetd reload \
599         elif grep -iEqs "^ServerType[[:space:]]+standalone" %{_sysconfdir}/proftpd.conf; then \
600                 %service -q proftpd restart \
601         fi \
602 fi
603
604 # it's sooo annoying to write them
605 %define module_scripts() \
606 %post %1 \
607 %module_post \
608 \
609 %postun %1 \
610 %module_postun
611
612 %module_scripts mod_auth_pam
613 %module_scripts mod_ldap
614 %module_scripts mod_quotatab
615 %module_scripts mod_quotatab_file
616 %module_scripts mod_quotatab_ldap
617 %module_scripts mod_quotatab_sql
618 %module_scripts mod_ratio
619 %module_scripts mod_readme
620 %module_scripts mod_rewrite
621 %module_scripts mod_sql
622 %module_scripts mod_sql_mysql
623 %module_scripts mod_sql_postgres
624 %module_scripts mod_tls
625 %module_scripts mod_wrap
626
627 %files common
628 %defattr(644,root,root,755)
629 %doc sample-configurations/*.conf CREDITS ChangeLog NEWS RELEASE_NOTES
630 %doc README README.capabilities README.classes README.controls README.IPv6
631 %doc README.modules
632 %doc doc/*.html doc/contrib doc/howto doc/modules
633 %dir %attr(750,root,ftp) %dir %{_sysconfdir}
634 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.conf
635 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %ghost %{_sysconfdir}/ftpusers
636 %attr(640,root,root) %{_sysconfdir}/ftpusers.default
637 %dir %attr(750,root,root) %{_sysconfdir}/conf.d
638 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mod_auth_file.conf
639 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mod_ident.conf
640 #%attr(640,root,root) %ghost /var/log/*
641 %attr(755,root,root) %{_bindir}/*
642 %attr(755,root,root) %{_sbindir}/*
643 %dir %{_libexecdir}
644 %attr(755,root,root) %{_libexecdir}/mod_auth_file.so
645 %attr(755,root,root) %{_libexecdir}/mod_facl.so
646 %attr(755,root,root) %{_libexecdir}/mod_ident.so
647 %attr(755,root,root) %{_libexecdir}/mod_ifsession.so
648 %attr(755,root,root) %{_libexecdir}/mod_lang.so
649 %dir %{_localstatedir}/proftpd
650 %{_mandir}/man[18]/*
651 %dir /var/lib/ftp
652 %dir /var/lib/ftp/pub
653 %attr(711,ftp,ftp) %dir /var/lib/ftp/pub/Incoming
654
655 %files inetd
656 %defattr(644,root,root,755)
657 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rc-inetd/ftpd
658 %{_mandir}/man5/*
659 %lang(ja) %{_mandir}/ja/man5/ftpusers*
660 %lang(pl) %{_mandir}/pl/man5/ftpusers*
661 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
662 %lang(ru) %{_mandir}/ru/man5/ftpusers*
663
664 %files standalone
665 %defattr(644,root,root,755)
666 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/proftpd
667 %attr(754,root,root) /etc/rc.d/init.d/proftpd
668 %{_mandir}/man5/*
669 %lang(ja) %{_mandir}/ja/man5/ftpusers*
670 %lang(pl) %{_mandir}/pl/man5/ftpusers*
671 %lang(pt_BR) %{_mandir}/pt_BR/man5/ftpusers*
672 %lang(ru) %{_mandir}/ru/man5/ftpusers*
673
674 %files devel
675 %defattr(644,root,root,755)
676 %{_includedir}/%{name}
677 %{_pkgconfigdir}/%{name}.pc
678
679 %files anonftp
680 %defattr(644,root,root,755)
681 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/anonftp.conf
682
683 %if %{with pam}
684 %files mod_auth_pam
685 %defattr(644,root,root,755)
686 %doc README.PAM
687 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/*
688 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.ftp
689 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mod_auth_pam.conf
690 %attr(755,root,root) %{_libexecdir}/mod_auth_pam.so
691 %endif
692
693 %if %{with ldap}
694 %files mod_ldap
695 %defattr(644,root,root,755)
696 %doc README.LDAP
697 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mod_ldap.conf
698 %attr(755,root,root) %{_libexecdir}/mod_ldap.so
699 %endif
700
701 %files mod_quotatab
702 %defattr(644,root,root,755)
703 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mod_quotatab.conf
704 %attr(755,root,root) %{_libexecdir}/mod_quotatab.so
705
706 %if %{with quotafile}
707 %files mod_quotatab_file
708 %defattr(644,root,root,755)
709 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mod_quotatab_file.conf
710 %attr(755,root,root) %{_libexecdir}/mod_quotatab_file.so
711 %endif
712
713 %if %{with quotaldap}
714 %files mod_quotatab_ldap
715 %defattr(644,root,root,755)
716 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mod_quotatab_ldap.conf
717 %attr(755,root,root) %{_libexecdir}/mod_quotatab_ldap.so
718 %endif
719
720 %if %{with quotamysql} || %{with quotapgsql}
721 %files mod_quotatab_sql
722 %defattr(644,root,root,755)
723 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mod_quotatab_sql.conf
724 %attr(755,root,root) %{_libexecdir}/mod_quotatab_sql.so
725 %endif
726
727 %files mod_ratio
728 %defattr(644,root,root,755)
729 %doc contrib/README.ratio
730 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mod_ratio.conf
731 %attr(755,root,root) %{_libexecdir}/mod_ratio.so
732
733 %files mod_readme
734 %defattr(644,root,root,755)
735 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mod_readme.conf
736 %attr(755,root,root) %{_libexecdir}/mod_readme.so
737
738 %files mod_rewrite
739 %defattr(644,root,root,755)
740 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mod_rewrite.conf
741 %attr(755,root,root) %{_libexecdir}/mod_rewrite.so
742
743 %if %{with mysql} || %{with pgsql}
744 %files mod_sql
745 %defattr(644,root,root,755)
746 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mod_sql.conf
747 %attr(755,root,root) %{_libexecdir}/mod_sql.so
748 %endif
749
750 %if %{with mysql}
751 %files mod_sql_mysql
752 %defattr(644,root,root,755)
753 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mod_sql_mysql.conf
754 %attr(755,root,root) %{_libexecdir}/mod_sql_mysql.so
755 %endif
756
757 %if %{with pgsql}
758 %files mod_sql_postgres
759 %defattr(644,root,root,755)
760 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mod_sql_postgres.conf
761 %attr(755,root,root) %{_libexecdir}/mod_sql_postgres.so
762 %endif
763
764 %files mod_tls
765 %defattr(644,root,root,755)
766 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mod_tls.conf
767 %attr(755,root,root) %{_libexecdir}/mod_tls.so
768
769 %files mod_wrap
770 %defattr(644,root,root,755)
771 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/mod_wrap.conf
772 %attr(755,root,root) %{_libexecdir}/mod_wrap.so
This page took 0.115151 seconds and 3 git commands to generate.