]> git.pld-linux.org Git - packages/cyrus-sasl.git/blob - cyrus-sasl.spec
- rel 14
[packages/cyrus-sasl.git] / cyrus-sasl.spec
1 # TODO:
2 # - add ldap plugin from openldap sources
3 #
4 # Conditional build:
5 %bcond_without  cryptedpw       # if you keep crypted passwords in your *sql
6 %bcond_without  ldap            # disable LDAP support for saslauthd
7 %bcond_without  gssapi          # do not enable GSSAPI support for saslauthd and build gssapi plugin
8 %bcond_without  mysql           # don't build MySQL pluggin
9 %bcond_without  pgsql           # do not build PostgreSQL pluggin
10 %bcond_without  sqlite          # do not enable sqlite plugin
11 %bcond_with     authlib         # enable courier-authlib (i wasn't able to test it)
12 %bcond_with     opie            # enable opie plugin
13 %bcond_with     srp             # build srp pluggin
14 %bcond_with     pwcheck         # build pwcheck helper (deprecated)
15 %bcond_with     x509            # build x509 plugin (no sources in package???)
16 #
17 %if %{without mysql} && %{without pgsql}
18 %undefine with_cryptedpw
19 %endif
20
21 Summary:        The SASL library API for the Cyrus mail system
22 Summary(pl.UTF-8):      Biblioteka Cyrus SASL
23 Summary(pt_BR.UTF-8):   Implementação da API SASL
24 Summary(ru.UTF-8):      Библиотека Cyrus SASL
25 Summary(uk.UTF-8):      Бібліотека Cyrus SASL
26 Name:           cyrus-sasl
27 Version:        2.1.23
28 Release:        14
29 License:        distributable
30 Group:          Libraries
31 Source0:        ftp://ftp.andrew.cmu.edu/pub/cyrus/%{name}-%{version}.tar.gz
32 # Source0-md5:  2eb0e48106f0e9cd8001e654f267ecbc
33 Source1:        saslauthd.init
34 Source2:        saslauthd.sysconfig
35 Source3:        %{name}.pam
36 Source4:        check_saslauthd.cfg
37 Patch0:         %{name}-nolibs.patch
38 Patch1:         %{name}-lt.patch
39 Patch2:         %{name}-split-sql.patch
40 Patch3:         %{name}-opie.patch
41 Patch4:         %{name}-gcc4.patch
42 # Adapted from http://frost.ath.cx/software/cyrus-sasl-patches/dist/2.1.19/cyrus-sasl-2.1.19-checkpw.c+sql.c.patch
43 Patch5:         %{name}-cryptedpw.patch
44 Patch6:         %{name}-md5sum-passwords.patch
45 Patch7:         %{name}-db.patch
46 Patch8:         %{name}-automake_1_10.patch
47 Patch9:         %{name}-digest-commas.patch
48 Patch10:        %{name}-keytab.patch
49 Patch11:        %{name}-sizes.patch
50 Patch12:        %{name}-nagios-plugin.patch
51 Patch13:        %{name}-parallel-make.patch
52 Patch14:        %{name}-gssapi-detect.patch
53 Patch15:        %{name}-saslauthd-httpform-urlescape.patch
54 Patch16:        %{name}-ac-libs.patch
55 URL:            http://asg.web.cmu.edu/sasl/
56 BuildRequires:  autoconf >= 2.54
57 BuildRequires:  automake >= 1:1.7
58 %{?with_authlib:BuildRequires:  courier-authlib-devel}
59 BuildRequires:  db-devel
60 BuildRequires:  ed
61 BuildRequires:  groff
62 %{?with_gssapi:BuildRequires:   heimdal-devel}
63 BuildRequires:  libtool >= 1.4
64 %{?with_mysql:BuildRequires:    mysql-devel}
65 %{?with_ldap:BuildRequires:     openldap-devel >= 2.3.0}
66 BuildRequires:  openssl-devel >= 0.9.7d
67 %{?with_opie:BuildRequires:     opie-devel}
68 BuildRequires:  pam-devel
69 %{?with_pgsql:BuildRequires:    postgresql-devel}
70 BuildRequires:  rpmbuild(macros) >= 1.268
71 %{?with_sqlite:BuildRequires:   sqlite-devel}
72 Requires:       pam >= 0.79.0
73 Requires:       %{name}-libs = %{version}-%{release}
74 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
75
76 %define         _sysconfdir     /etc/sasl
77
78 %define         specflags       -fno-strict-aliasing
79
80 %description
81 This is an implementation of the SASL API, useful for adding
82 authentication, authorization, and security to network protocols. The
83 SASL protocol itself is documented in rfc2222; the API standard is a
84 work in progress.
85
86 Note: remember to install appropriate plugins, or you won't have any
87 authentication mechanisms available.
88
89 %description -l pl.UTF-8
90 Pakiet cyrus-sasl zawiera implementację biblioteki API SASL dla
91 systemu poczty elektronicznej Cyrusa. Biblioteka ta jest przydatna
92 także do dodawania uwierzytelniania, autoryzacji oraz zwiększania
93 bezpieczeństwa protokołów sieciowych. Sam protokół SASL jest opisany w
94 RFC 2222; standaryzacja API jest w toku.
95
96 Uwaga: aby były dostępne jakiekolwiek mechanizmy autoryzacji, należy
97 doinstalować odpowiednie wtyczki.
98
99 %description -l pt_BR.UTF-8
100 Esta é uma implementação da API SASL, útil para acrescentar
101 autenticação, autorização e seguança (criptografia) para protocolos de
102 rede. O protocolo SASL está documentado na RFC 2222. A API "padrão"
103 ainda está em desenvolvimento.
104
105 %description -l ru.UTF-8
106 Пакет cyrus-sasl содержит реализацию Cyrus SASL. SASL - это Simple
107 Authentication and Security Layer, метод для добавления поддержки
108 аутентикации к протоколам, основанным на соединениях.
109
110 %description -l uk.UTF-8
111 Пакет cyrus-sasl містить реалізацію Cyrus SASL. SASL - це Simple
112 Authentication and Security Layer, метод для додання підтримки
113 аутентикації до протоколів, базованих на з'єднаннях.
114
115 %package libs
116 Summary:        cyrus-sasl library itself
117 Summary(pl.UTF-8):      Sama biblioteka cyrus-sasl
118 Group:          Libraries
119 Requires(post,postun):  /sbin/ldconfig
120 Conflicts:      cyrus-sasl < 2.1.23-8
121
122 %description libs
123 cyrus-sasl library itself.
124
125 %description libs -l pl.UTF-8
126 Sama biblioteka cyrus-sasl.
127
128 %package devel
129 Summary:        Header files and documentation for cyrus-sasl
130 Summary(pl.UTF-8):      Pliki nagłówkowe i dokumentacja dla cyrus-sasl
131 Summary(pt_BR.UTF-8):   Exemplos e arquivos para desenvolvimento com SASL
132 Summary(ru.UTF-8):      Файлы для программирования с библиотекой Cyrus SASL
133 Summary(uk.UTF-8):      Файли для програмування з бібліотекою Cyrus SASL
134 Group:          Development/Libraries
135 Requires:       %{name} = %{version}-%{release}
136
137 %description devel
138 This includes the header files and documentation needed to develop
139 applications which use SASL.
140
141 %description devel -l pl.UTF-8
142 Pliki nagłówkowe i dokumentacja dla cyrus-sasl.
143
144 %description devel -l pt_BR.UTF-8
145 Este pacote inclui os arquivos de cabeçalho e documentação necessários
146 para desenvolver aplicativos que usem SASL.
147
148 %description devel -l ru.UTF-8
149 Хедеры и библиотеки, необходимые для разработки приложений,
150 использующих Cyrus SASL.
151
152 %description devel -l uk.UTF-8
153 Хедери та бібліотеки, необхідні для розробки програм, що
154 використовують Cyrus SASL.
155
156 %package static
157 Summary:        Static cyrus-sasl libraries
158 Summary(pl.UTF-8):      Statyczne biblioteki cyrus-sasl
159 Summary(ru.UTF-8):      Статические библиотеки Cyrus SASL
160 Summary(uk.UTF-8):      Статичні бібліотеки Cyrus SASL
161 Group:          Development/Libraries
162 Requires:       %{name}-devel = %{version}-%{release}
163
164 %description static
165 Static cyrus-sasl libraries.
166
167 %description static -l pl.UTF-8
168 Statyczne biblioteki cyrus-sasl.
169
170 %description static -l ru.UTF-8
171 Статические библиотеки, необходимые для разработки приложений,
172 использующих Cyrus SASL.
173
174 %description static -l uk.UTF-8
175 Статичні бібліотеки, необхідні для розробки програм, що використовують
176 Cyrus SASL.
177
178 %package cram-md5
179 Summary:        Cram-MD5 Cyrus SASL plugin
180 Summary(pl.UTF-8):      Wtyczka Cram-MD5 do Cyrus SASL
181 Summary(pt_BR.UTF-8):   Mecanismo SASL CRAM-MD5
182 Group:          Libraries
183 Requires:       %{name} = %{version}-%{release}
184
185 %description cram-md5
186 This plugin implements the SASL CRAM-MD5 mechanism. CRAM-MD5 is the
187 mandatory-to-implement authentication mechanism for a number of
188 protocols; it uses MD5 with a challenge/response system to
189 authenticate the user.
190
191 %description cram-md5 -l pl.UTF-8
192 Wtyczka dodająca obsługę mechanizmu CRAM-MD5 do Cyrus SASL. CRAM-MD5
193 jest obowiązkowym do zaimplementowania mechanizmem uwierzytelniania
194 dla wielu protokołów; do uwierzytelnienia użytkownika używa MD5 wraz z
195 systemem challenge/response.
196
197 %description cram-md5 -l pt_BR.UTF-8
198 Este plugin implementa o mecanismo SASL CRAM-MD5. CRAM-MD5 é o
199 mecanismo de autenticação obrigatório de ser implementado para vários
200 protocolos: ele usa MD5 com um sistema de desafio/resposta para
201 autenticar o usuário.
202
203 %package digest-md5
204 Summary:        Digest-MD5 Cyrus SASL plugin
205 Summary(pl.UTF-8):      Wtyczka Digest-MD5 do Cyrus SASL
206 Summary(pt_BR.UTF-8):   Mecanismo SASL DIGEST-MD5
207 Group:          Libraries
208 Requires:       %{name} = %{version}-%{release}
209
210 %description digest-md5
211 This plugin implements the latest draft of the SASL DIGEST-MD5
212 mechanism. Although not yet finalized, this is likely to become the
213 new mandatory-to-implement authentication system in all new protocols.
214 It's based on the digest md5 authentication system designed for HTTP.
215
216 %description digest-md5 -l pl.UTF-8
217 Wtyczka dodająca najnowszą wersję mechanizmu DIGEST-MD5 do Cyrus SASL.
218 Pomimo tego, że nie jest jeszcze ukończony, najprawdopodobniej stanie
219 się obowiązkowym do zaimplementowania systemem uwierzytelniania we
220 wszystkich nowych protokołach. Bazuje na systemie uwierzytelniania
221 Digest-MD5 zaprojektowanym dla HTTP.
222
223 %description digest-md5 -l pt_BR.UTF-8
224 Este plugin implementa a última versão da especificação do mecanismo
225 SASL DIGEST-MD5. Embora ainda não esteja finalizado, DIGEST-MD5
226 provavelmente será o novo sistema de autenticação obrigatório para
227 protocolos novos. Ele é baseado na autenticação md5 digest
228 desenvolvida para HTTP.
229
230 %package plain
231 Summary:        Plain Cyrus SASL plugin
232 Summary(pl.UTF-8):      Wtyczka plain do Cyrus SASL
233 Summary(pt_BR.UTF-8):   Mecanismo SASL PLAIN
234 Group:          Libraries
235 Requires:       %{name} = %{version}-%{release}
236
237 %description plain
238 This plugin implements the SASL PLAIN mechanism. Although insecure,
239 PLAIN is useful for transitioning to new security mechanisms, as this
240 is the only mechanism which gives the server a copy of the user's
241 password.
242
243 %description plain -l pl.UTF-8
244 Wtyczka dodająca obsługę mechanizmu PLAIN do Cyrus SASL. Pomimo tego,
245 że nie jest bezpieczny, PLAIN jest przydatny przy przechodzeniu na
246 nowe mechanizmu bezpieczeństwa, jako że jest to jedyny mechanizm,
247 który udostępnia serwerowi kopię hasła użytkownika.
248
249 %description plain -l pt_BR.UTF-8
250 Este plugin implementa o mecanismo SASL PLAIN. Embora inseguro, este
251 mecanismo é útil durante transições para novos mecanismos de
252 segurança, pois é o único esquema que fornece uma cópia da senha do
253 usuário para o servidor.
254
255 %package anonymous
256 Summary:        Anonymous Cyrus SASL plugin
257 Summary(pl.UTF-8):      Wtyczka anonymous do Cyrus SASL
258 Summary(pt_BR.UTF-8):   Mecanismo SASL ANONYMOUS
259 Group:          Libraries
260 Requires:       %{name} = %{version}-%{release}
261
262 %description anonymous
263 This plugin implements the SASL ANONYMOUS mechanism, used for
264 anonymous authentication.
265
266 %description anonymous -l pl.UTF-8
267 Wtyczka dodająca obsługę mechanizmu ANONYMOUS do Cyrus SASL. Służy do
268 anonimowego uwierzytelniania.
269
270 %description anonymous -l pt_BR.UTF-8
271 Este plugin implementa o mecanismo SASL ANONYMOUS, usado para
272 autenticação anônima.
273
274 %package gssapi
275 Summary:        GSSAPI Cyrus SASL plugin
276 Summary(pl.UTF-8):      Wtyczka GSSAPI do Cyrus SASL
277 Summary(pt_BR.UTF-8):   Mecanismo SASL GSSAPI
278 Group:          Libraries
279 Requires:       %{name} = %{version}-%{release}
280
281 %description gssapi
282 This plugin implements the SASL GSSAPI mechanism, used for
283 GSSAPI/Kerberos5 authentication.
284
285 %description gssapi -l pl.UTF-8
286 Wtyczka dodająca obsługę mechanizmu SASL GSSAPI, używanego do
287 uwierzytelniania z użyciem GSSAPI/Kerberos5.
288
289 %description gssapi -l pt_BR.UTF-8
290 Este plugin implementa o mecanismo SASL GSSAPI, usado para
291 autenticação Kerberos/GSSAPI.
292
293 %package login
294 Summary:        Unsupported Login Cyrus SASL plugin
295 Summary(pl.UTF-8):      Nie wspierana wtyczka Login do Cyrus SASL
296 Group:          Libraries
297 Requires:       %{name} = %{version}-%{release}
298
299 %description login
300 Unsupported LOGIN Cyrus SASL plugin.
301
302 %description login -l pl.UTF-8
303 Wtyczka dodająca obsługę nie wspieranego mechanizmu LOGIN do Cyrus
304 SASL.
305
306 %package srp
307 Summary:        SRP Cyrus SASL plugin
308 Summary(pl.UTF-8):      Wtyczka SRP do Cyrus SASL
309 Summary(pt_BR.UTF-8):   Mecanismo SASL SRP
310 Group:          Libraries
311 Requires:       %{name} = %{version}-%{release}
312
313 %description srp
314 This plugin implements the SASL SRP mechanism, based on the Secure
315 Remote Password protocol. This mechanism performs mutual
316 authentication and can provide a security layer with replay detection,
317 integrity protection and/or condifentiality protection.
318
319 %description srp -l pl.UTF-8
320 Wtyczka dodająca obsługę mechanizmu SRP do Cyrus SASL. Bazuje na
321 protokole Secure Remote Password. Ten mechanizm dokonuje wzajemnego
322 uwierzytelnienia i może dodawać warstwę bezpieczeństwa z wykrywaniem
323 powtarzania, zabezpieczeniem integralności i/lub poufności.
324
325 %description srp -l pt_BR.UTF-8
326 Este plugin implementa o mecanismo SASL SRP, baseado no protocolo SRP
327 (Secure Remote Password). Este mecanismo oferece autenticação mútua
328 (do cliente e do servidor) e pode prover uma camada de segurança com
329 detecção de ataques de replay, garantia de integridade e/ou
330 confidencialidade.
331
332 %package otp
333 Summary:        OTP Cyrus SASL plugin
334 Summary(pl.UTF-8):      Wtyczka OTP do Cyrus SASL
335 Summary(pt_BR.UTF-8):   Mecanismo SASL OTP
336 Group:          Libraries
337 Requires:       %{name} = %{version}-%{release}
338
339 %description otp
340 This plugin implements the SASL OTP (One Time Password) mechanism.
341
342 %description otp -l pl.UTF-8
343 Wtyczka dodająca obsługę mechanizmu OTP (hasła jednorazowe) do Cyrus
344 SASL.
345
346 %package opie
347 Summary:        OPIE Cyrus SASL plugin
348 Summary(pl.UTF-8):      Wtyczka OPIE do Cyrus SASL
349 Summary(pt_BR.UTF-8):   Mecanismo SASL OPIE
350 Group:          Libraries
351 Requires:       %{name} = %{version}-%{release}
352
353 %description opie
354 This plugin implements the SASL OPIE (One Time Password) mechanism.
355
356 %description opie -l pl.UTF-8
357 Wtyczka dodająca obsługę mechanizmu OPIE (hasła jednorazowe) do Cyrus
358 SASL.
359
360 %package x509
361 Summary:        x509 Cyrus SASL plugin
362 Summary(pl.UTF-8):      Wtyczka x509 do Cyrus SASL
363 Group:          Libraries
364 Requires:       %{name} = %{version}-%{release}
365
366 %description x509
367 x509 Cyrus SASL plugin.
368
369 %description x509 -l pl.UTF-8
370 Wtyczka x509 do Cyrus SASL.
371
372 %package saslauthd
373 Summary:        Cyrus SASL authd
374 Summary(pl.UTF-8):      Demon authd do Cyrus SASL
375 Group:          Daemons
376 Requires(post,preun):   /sbin/chkconfig
377 Requires:       %{name} = %{version}-%{release}
378 Requires:       /sbin/chkconfig
379 Requires:       rc-scripts
380
381 %description saslauthd
382 Cyrus SASL authd.
383
384 %description saslauthd -l pl.UTF-8
385 Demon authd do Cyrus SASL.
386
387 %package pwcheck
388 Summary:        Cyrus SASL pwcheck helper
389 Summary(pl.UTF-8):      Program pomocniczy pwcheck do Cyrus SASL
390 Group:          Libraries
391 Requires:       %{name} = %{version}-%{release}
392
393 %description pwcheck
394 Cyrus SASL pwcheck helper.
395
396 %description pwcheck -l pl.UTF-8
397 Program pomocniczy pwcheck do Cyrus SASL.
398
399 %package sasldb
400 Summary:        Cyrus SASL sasldb plugin
401 Summary(pl.UTF-8):      Wtyczka sasldb do Cyrus SASL
402 Group:          Libraries
403 Requires:       %{name} = %{version}-%{release}
404
405 %description sasldb
406 Cyrus SASL sasldb plugin.
407
408 %description sasldb -l pl.UTF-8
409 Wtyczka sasldb do Cyrus SASL.
410
411 %package mysql
412 Summary:        Cyrus SASL MySQL plugin
413 Summary(pl.UTF-8):      Wtyczka MySQL do Cyrus SASL
414 Group:          Libraries
415 Requires:       %{name} = %{version}-%{release}
416
417 %description mysql
418 Cyrus SASL MySQL plugin.
419
420 %description mysql -l pl.UTF-8
421 Wtyczka MySQL do Cyrus SASL.
422
423 %package pgsql
424 Summary:        Cyrus SASL PostgreSQL plugin
425 Summary(pl.UTF-8):      Wtyczka PostgreSQL do Cyrus SASL
426 Group:          Libraries
427 Requires:       %{name} = %{version}-%{release}
428
429 %description pgsql
430 Cyrus SASL PostgreSQL plugin.
431
432 %description pgsql -l pl.UTF-8
433 Wtyczka PostgreSQL do Cyrus SASL.
434
435 %package sqlite
436 Summary:        Cyrus SQLite PostgreSQL plugin
437 Summary(pl.UTF-8):      Wtyczka SQLite do Cyrus SASL
438 Group:          Libraries
439 Requires:       %{name} = %{version}-%{release}
440
441 %description sqlite
442 Cyrus SASL SQLite plugin.
443
444 %description sqlite -l pl.UTF-8
445 Wtyczka SQLite do Cyrus SASL.
446
447 %package -n nagios-plugin-check_saslauthd
448 Summary:        Nagios plugin to check health of saslauthd
449 Summary(pl.UTF-8):      Wtyczka Nagiosa do sprawdzania działania saslauthd
450 Group:          Networking
451 Requires:       nagios-core
452
453 %description -n nagios-plugin-check_saslauthd
454 Nagios plugin to check health of saslauthd.
455
456 %description -n nagios-plugin-check_saslauthd -l pl.UTF-8
457 Wtyczka Nagiosa do sprawdzania działania saslauthd.
458
459 %prep
460 %setup -q
461 %patch0 -p1
462 %patch1 -p1
463 %patch2 -p1
464 %patch3 -p1
465 %patch4 -p1
466 %if %{with cryptedpw}
467 %patch5 -p1
468 %patch6 -p1
469 %endif
470 %patch7 -p1
471 %patch8 -p1
472 %patch9 -p2
473 %patch10 -p1
474 %patch11 -p1
475 %patch12 -p1
476 %patch13 -p1
477 %patch14 -p1
478 %patch15 -p0
479 %patch16 -p1
480
481 cd doc
482 echo "cyrus-sasl complies with the following RFCs:" > rfc-compliance
483 ls rfc*.txt >> rfc-compliance
484 rm -f rfc*.txt
485 cd ..
486
487 rm -rf autom4te.cache saslauthd/autom4te.cache
488 # acinclude.m4 contains only old libtool.m4
489 rm -f acinclude.m4 libtool config/libtool.m4 saslauthd/acinclude.m4
490
491 # update to our paths
492 sed -i -e '
493         s,/usr/local/etc/saslauthd.conf,%{_sysconfdir}/saslauthd.conf,g
494         s,/etc/saslauthd.conf,%{_sysconfdir}/saslauthd.conf,g
495         s,/var/run/saslauthd/mux,/var/lib/sasl2/mux,g
496         s,/var/state/saslauthd,/var/lib/sasl2,g
497 ' saslauthd/saslauthd.8 saslauthd/saslauthd.mdoc saslauthd/LDAP_SASLAUTHD doc/sysadmin.html
498
499 %build
500 %{__libtoolize}
501 %{__aclocal} -I cmulocal -I config
502 %{__autoheader}
503 %{__automake}
504 %{__autoconf}
505
506 cd saslauthd
507 %{__libtoolize}
508 %{__aclocal} -I ../cmulocal -I ../config -I config
509 %{__autoheader}
510 %{__automake}
511 %{__autoconf}
512 cd ..
513
514 %configure \
515         --with-lib-subdir=%{_lib} \
516         %{?with_cryptedpw: LDFLAGS=-lcrypt} \
517         --disable-krb4 \
518         %{!?with_gssapi: --disable-gssapi} \
519         %{?with_gssapi: --enable-gssapi --with-gss_impl=heimdal} \
520         --enable-login \
521         --enable-sample \
522         --enable-httpform \
523         --enable-sql \
524         %{?with_srp: --enable-srp} \
525         --enable-static \
526         --with-plugindir=%{_libdir}/sasl2 \
527         --with-configdir=%{_sysconfdir} \
528         --with-dblib=berkeley \
529         --with-dbpath=/var/lib/sasl2/sasl.db \
530         %{?with_authlib:--with-authdaemond=/var/spool/authdaemon/socket} \
531         %{?with_ldap: --with-ldap=%{_prefix}} \
532         %{?with_mysql: --with-mysql=%{_prefix}} \
533         %{?with_pgsql: --with-pgsql=%{_prefix}} \
534         %{?with_sqlite: --with-sqlite=%{_prefix}} \
535         %{?with_opie: --with-opie=%{_prefix}} \
536         --with-pam \
537         %{?with_pwcheck: --with-pwcheck=/var/lib/sasl2} \
538         --with-saslauthd=/var/lib/sasl2
539
540 %{__make}
541
542 %{__make} -C saslauthd testsaslauthd
543 %{__make} -C saslauthd saslcache
544 %{__make} -C sample sample-client sample-server
545
546 cd doc
547 RFCLIST=$(grep 'rfc.\+\.txt' rfc-compliance)
548 for i in $RFCLIST; do
549         RFCDIR=../RFC/text/`echo $i | sed -e 's:^rfc::' -e 's:..\.txt$::' `00
550         echo -e ',s:'$i':'$RFCDIR/$i'\n,w\nq' | ed index.html
551 done
552
553 %install
554 rm -rf $RPM_BUILD_ROOT
555 install -d $RPM_BUILD_ROOT{%{_bindir},/var/lib/sasl2,%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \
556                 $RPM_BUILD_ROOT%{_mandir}/man8
557
558 %{__make} install \
559         sasldir=%{_libdir}/sasl2 \
560         DESTDIR=$RPM_BUILD_ROOT
561
562 rm -rf $RPM_BUILD_ROOT%{_mandir}/cat*
563 rm -f $RPM_BUILD_ROOT%{_libdir}/sasl2/*.{la,a}
564
565 cp -a utils/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
566 cp -a saslauthd/saslauthd.mdoc $RPM_BUILD_ROOT%{_mandir}/man8/saslauthd.8
567
568 ln -sf libsasl2.so $RPM_BUILD_ROOT%{_libdir}/libsasl.so
569
570 touch $RPM_BUILD_ROOT/var/lib/sasl2/sasl.db
571
572 # create empty config
573 touch $RPM_BUILD_ROOT%{_sysconfdir}/saslauthd.conf
574 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/saslauthd
575 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/saslauthd
576 cp -a %{SOURCE3} cyrus.pam
577
578 install -p saslauthd/{testsaslauthd,saslcache} $RPM_BUILD_ROOT%{_sbindir}
579
580 # sample programs for testing sasl
581 libtool --mode=install cp sample/sample-client $RPM_BUILD_ROOT%{_bindir}/sasl-sample-client
582 libtool --mode=install cp sample/sample-server $RPM_BUILD_ROOT%{_bindir}/sasl-sample-server
583
584 # package for ghost
585 touch $RPM_BUILD_ROOT/var/lib/sasl2/{cache.flock,cache.mmap,mux,mux.accept,saslauthd.pid}
586
587 install -d $RPM_BUILD_ROOT/etc/nagios/plugins
588 %{__sed} -e 's,@plugindir@,%{_libdir}/nagios/plugins,' %{SOURCE4} > $RPM_BUILD_ROOT/etc/nagios/plugins/check_saslauthd.cfg
589
590 %clean
591 rm -rf $RPM_BUILD_ROOT
592
593 %post   libs -p /sbin/ldconfig
594 %postun libs -p /sbin/ldconfig
595
596 %post saslauthd
597 /sbin/chkconfig --add saslauthd
598 %service saslauthd restart
599
600 %preun saslauthd
601 if [ "$1" = "0" ]; then
602         %service saslauthd stop
603         /sbin/chkconfig --del saslauthd
604 fi
605
606 %triggerin saslauthd -- pam
607 # restart saslauthd if pam is upgraded
608 # (saslauth is linked with old libpam but tries to open modules linked with new libpam)
609 if [ "$2" != 1 ]; then
610         %service -q saslauthd restart
611 fi
612
613 %files
614 %defattr(644,root,root,755)
615 %doc AUTHORS COPYING ChangeLog NEWS README
616 %doc doc/{ONEWS,TODO,*.txt,*.html,*.fig,rfc-compliance}
617 %dir %{_sysconfdir}
618 %dir %{_libdir}/sasl2
619 # sample programs to subpackage instead?
620 %attr(755,root,root) %{_bindir}/sasl-sample-client
621 %attr(755,root,root) %{_bindir}/sasl-sample-server
622 %attr(755,root,root) %{_sbindir}/pluginviewer
623 %attr(755,root,root) %{_sbindir}/sasldblistusers2
624 %attr(755,root,root) %{_sbindir}/saslpasswd2
625 %dir /var/lib/sasl2
626 %attr(640,root,mail) %ghost %config(noreplace) %verify(not md5 mtime size) /var/lib/sasl2/sasl.db
627 %{_mandir}/man8/pluginviewer.8*
628 %{_mandir}/man8/sasldblistusers2.8*
629 %{_mandir}/man8/saslpasswd2.8*
630
631 %files libs
632 %defattr(644,root,root,755)
633 %attr(755,root,root) %{_libdir}/libsasl2.so.*.*.*
634 %attr(755,root,root) %ghost %{_libdir}/libsasl2.so.2
635
636 %files devel
637 %defattr(644,root,root,755)
638 %attr(755,root,root) %{_libdir}/libsasl2.so
639 %attr(755,root,root) %{_libdir}/libsasl.so
640 %{_libdir}/libsasl2.la
641 %{_includedir}/sasl
642 %{_mandir}/man3/sasl*.3*
643
644 %files static
645 %defattr(644,root,root,755)
646 %{_libdir}/libsasl2.a
647
648 %files anonymous
649 %defattr(644,root,root,755)
650 %attr(755,root,root) %{_libdir}/sasl2/libanonymous.so*
651
652 %if %{with gssapi}
653 %files gssapi
654 %defattr(644,root,root,755)
655 %attr(755,root,root) %{_libdir}/sasl2/libgssapiv2.so*
656 %endif
657
658 %files cram-md5
659 %defattr(644,root,root,755)
660 %attr(755,root,root) %{_libdir}/sasl2/libcrammd5.so*
661
662 %files digest-md5
663 %defattr(644,root,root,755)
664 %attr(755,root,root) %{_libdir}/sasl2/libdigestmd5.so*
665
666 %files login
667 %defattr(644,root,root,755)
668 %attr(755,root,root) %{_libdir}/sasl2/liblogin.so*
669
670 %files otp
671 %defattr(644,root,root,755)
672 %attr(755,root,root) %{_libdir}/sasl2/libotp.so*
673
674 %if %{with opie}
675 %files opie
676 %defattr(644,root,root,755)
677 %attr(755,root,root) %{_libdir}/sasl2/libopie.so*
678 %endif
679
680 %files plain
681 %defattr(644,root,root,755)
682 %attr(755,root,root) %{_libdir}/sasl2/libplain.so*
683
684 %files sasldb
685 %defattr(644,root,root,755)
686 %attr(755,root,root) %{_libdir}/sasl2/libsasldb.so*
687
688 %if %{with mysql}
689 %files mysql
690 %defattr(644,root,root,755)
691 %attr(755,root,root) %{_libdir}/sasl2/libmysql.so*
692 %endif
693
694 %if %{with pgsql}
695 %files pgsql
696 %defattr(644,root,root,755)
697 %attr(755,root,root) %{_libdir}/sasl2/libpgsql.so*
698 %endif
699
700 %if %{with sqlite}
701 %files sqlite
702 %defattr(644,root,root,755)
703 %attr(755,root,root) %{_libdir}/sasl2/libsqlite.so*
704 %endif
705
706 %if %{with srp}
707 %files srp
708 %defattr(644,root,root,755)
709 %attr(755,root,root) %{_libdir}/sasl2/libsrp.so*
710 %endif
711
712 %if %{with x509}
713 %files x509
714 %defattr(644,root,root,755)
715 %attr(755,root,root) %{_libdir}/sasl2/libx509.so*
716 %endif
717
718 %if %{with pwcheck}
719 %files pwcheck
720 %defattr(644,root,root,755)
721 %attr(755,root,root) %{_sbindir}/pwcheck
722 %endif
723
724 %files saslauthd
725 %defattr(644,root,root,755)
726 %doc cyrus.pam
727 %doc saslauthd/{AUTHORS,LDAP_SASLAUTHD}
728 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/saslauthd.conf
729 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/saslauthd
730 %attr(755,root,root) %{_sbindir}/saslauthd
731 %attr(755,root,root) %{_sbindir}/testsaslauthd
732 %attr(755,root,root) %{_sbindir}/saslcache
733 %attr(754,root,root) /etc/rc.d/init.d/saslauthd
734 %ghost /var/lib/sasl2/cache.flock
735 %ghost /var/lib/sasl2/cache.mmap
736 %ghost /var/lib/sasl2/mux
737 %ghost /var/lib/sasl2/mux.accept
738 %ghost /var/lib/sasl2/saslauthd.pid
739 %{_mandir}/man8/saslauthd.8*
740
741 %files -n nagios-plugin-check_saslauthd
742 %defattr(644,root,root,755)
743 %config(noreplace) %verify(not md5 mtime size) /etc/nagios/plugins/check_saslauthd.cfg
744 %attr(755,root,root) %{_libdir}/nagios/plugins/check_saslauthd
This page took 0.133221 seconds and 4 git commands to generate.