]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without ldap # do not include LDAP support | |
4 | ||
5 | Summary: Courier authentication library | |
6 | Summary(pl.UTF-8): Biblioteka uwierzytelniania Couriera | |
7 | Name: courier-authlib | |
8 | Version: 0.65.0 | |
9 | Release: 3 | |
10 | License: GPL v3 with OpenSSL exception | |
11 | Group: Networking/Daemons | |
12 | Source0: http://downloads.sourceforge.net/courier/%{name}-%{version}.tar.bz2 | |
13 | # Source0-md5: e9287e33b0e70ea3745517b4d719948d | |
14 | Source1: %{name}.init | |
15 | Patch0: %{name}-md5sum-passwords.patch | |
16 | Patch1: %{name}-authdaemonrc.patch | |
17 | Patch2: %{name}-nostatic.patch | |
18 | Patch3: %{name}-ltdl.patch | |
19 | URL: http://www.courier-mta.org/authlib/ | |
20 | BuildRequires: autoconf >= 2.63 | |
21 | BuildRequires: automake | |
22 | BuildRequires: db-devel | |
23 | BuildRequires: expect | |
24 | BuildRequires: libltdl-devel >= 2:2 | |
25 | BuildRequires: libtool >= 2:2 | |
26 | BuildRequires: mysql-devel | |
27 | %{?with_ldap:BuildRequires: openldap-devel >= 2.3.0} | |
28 | BuildRequires: pam-devel | |
29 | BuildRequires: postgresql-devel | |
30 | BuildRequires: rpmbuild(macros) >= 1.304 | |
31 | BuildRequires: sqlite3-devel | |
32 | BuildRequires: sysconftool | |
33 | BuildRequires: zlib-devel | |
34 | Requires(post,postun): /sbin/ldconfig | |
35 | Requires(post,preun): /sbin/chkconfig | |
36 | Requires: %{name}-libs = %{version}-%{release} | |
37 | Requires: /sbin/chkconfig | |
38 | Requires: rc-scripts | |
39 | Obsoletes: sqwebmail-auth-cram | |
40 | Obsoletes: sqwebmail-auth-pam | |
41 | Obsoletes: sqwebmail-auth-pwd | |
42 | Obsoletes: sqwebmail-auth-shadow | |
43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
44 | ||
45 | %define schemadir /usr/share/openldap/schema | |
46 | ||
47 | %description | |
48 | The Courier authentication library provides authentication services | |
49 | for other Courier applications. | |
50 | ||
51 | %description -l pl.UTF-8 | |
52 | Biblioteka uwierzytelniania Couriera dostarcza usługi uwierzytelniania | |
53 | dla innych aplikacji Couriera. | |
54 | ||
55 | %package libs | |
56 | Summary: Courier authentication library | |
57 | Summary(pl.UTF-8): Biblioteka uwierzytelniania Couriera | |
58 | Group: Libraries | |
59 | Requires(post,postun): /sbin/ldconfig | |
60 | ||
61 | %description libs | |
62 | The Courier authentication library provides authentication services | |
63 | for other Courier applications. | |
64 | ||
65 | This package contains libcourierauth.so which client programs link | |
66 | against. | |
67 | ||
68 | %description libs -l pl.UTF-8 | |
69 | Biblioteka uwierzytelniania Couriera dostarcza usługi uwierzytelniania | |
70 | dla innych aplikacji Couriera. | |
71 | ||
72 | %package devel | |
73 | Summary: Development files for the Courier authentication library | |
74 | Summary(pl.UTF-8): Pliki programistyczne dla biblioteki uwierzytelniania Couriera | |
75 | Group: Development/Libraries | |
76 | Requires: %{name} = %{version}-%{release} | |
77 | %{?with_ldap:Requires: %{name}-authldap = %{version}-%{release}} | |
78 | Requires: %{name}-authmysql = %{version}-%{release} | |
79 | Requires: %{name}-authpgsql = %{version}-%{release} | |
80 | Requires: %{name}-authpipe = %{version}-%{release} | |
81 | Requires: %{name}-authuserdb = %{version}-%{release} | |
82 | ||
83 | %description devel | |
84 | This package contains the development files needed to compile Courier | |
85 | packages that use this authentication library. Install this package in | |
86 | order to build the rest of the Courier packages. After they are built | |
87 | and installed this package can be removed. Files in this package are | |
88 | not needed at runtime. | |
89 | ||
90 | %description devel -l pl.UTF-8 | |
91 | Ten pakiet zawiera pliki programistyczne potrzebne do kompilacji | |
92 | pakietów Couriera używających biblioteki uwierzytelniania. Należy go | |
93 | zainstalować aby zbudować resztę pakietów Couriera. Po ich zbudowaniu | |
94 | i zainstalowaniu ten pakiet można usunąć. Pliki z tego pakietu nie są | |
95 | potrzebne w czasie działania programów. | |
96 | ||
97 | %package authldap | |
98 | Summary: LDAP support for the Courier authentication library | |
99 | Summary(pl.UTF-8): Obsługa LDAP dla biblioteki uwierzytelniania Couriera | |
100 | Group: Networking/Daemons | |
101 | Requires(pre,postun): sed >= 4.0 | |
102 | Requires: %{name} = %{version}-%{release} | |
103 | Obsoletes: courier-authldap | |
104 | Obsoletes: courier-imap-authldap | |
105 | Obsoletes: sqwebmail-auth-ldap | |
106 | ||
107 | %description authldap | |
108 | This package installs LDAP support for the Courier authentication | |
109 | library. Install this package in order to be able to authenticate | |
110 | using LDAP. | |
111 | ||
112 | %description authldap -l pl.UTF-8 | |
113 | Ten pakiet dodaje obsługę LDAP do biblioteki uwierzytelniania | |
114 | Couriera. Należy go zainstalować aby móc uwierzytelniać się z użyciem | |
115 | LDAP. | |
116 | ||
117 | %package authmysql | |
118 | Summary: MySQL support for the Courier authentication library | |
119 | Summary(pl.UTF-8): Obsługa MySQL dla biblioteki uwierzytelniania Couriera | |
120 | Group: Networking/Daemons | |
121 | Requires(pre,postun): sed >= 4.0 | |
122 | Requires: %{name} = %{version}-%{release} | |
123 | Obsoletes: courier-authmysql | |
124 | Obsoletes: courier-imap-authmysql | |
125 | Obsoletes: sqwebmail-auth-mysql | |
126 | ||
127 | %description authmysql | |
128 | This package installs MySQL support for the Courier authentication | |
129 | library. Install this package in order to be able to authenticate | |
130 | using MySQL. | |
131 | ||
132 | %description authmysql -l pl.UTF-8 | |
133 | Ten pakiet dodaje obsługę MySQL do biblioteki uwierzytelniania | |
134 | Couriera. Należy go zainstalować aby móc uwierzytelniać się z użyciem | |
135 | MySQL. | |
136 | ||
137 | %package authpgsql | |
138 | Summary: PostgreSQL support for the Courier authentication library | |
139 | Summary(pl.UTF-8): Obsługa PostgreSQL dla biblioteki uwierzytelniania Couriera | |
140 | Group: Networking/Daemons | |
141 | Requires(pre,postun): sed >= 4.0 | |
142 | Requires: %{name} = %{version}-%{release} | |
143 | Obsoletes: courier-authpgsql | |
144 | Obsoletes: courier-imap-authpgsql | |
145 | Obsoletes: sqwebmail-auth-pgsql | |
146 | ||
147 | %description authpgsql | |
148 | This package installs PostgreSQL support for the Courier | |
149 | authentication library. Install this package in order to be able to | |
150 | authenticate using PostgreSQL. | |
151 | ||
152 | %description authpgsql -l pl.UTF-8 | |
153 | Ten pakiet dodaje obsługę PostgreSQL do biblioteki uwierzytelniania | |
154 | Couriera. Należy go zainstalować aby móc uwierzytelniać się z użyciem | |
155 | PostgreSQL. | |
156 | ||
157 | %package authpipe | |
158 | Summary: External authentication module that communicates via pipes | |
159 | Summary(pl.UTF-8): Zewnętrzny moduł uwierzytelniający komunikujący się przez potoki | |
160 | Group: Networking/Daemons | |
161 | Requires(pre,postun): sed >= 4.0 | |
162 | Requires: %{name} = %{version}-%{release} | |
163 | Obsoletes: courier-authlib-authpipe | |
164 | ||
165 | %description authpipe | |
166 | This package installs the authpipe module, which is a generic plugin | |
167 | that enables authentication requests to be serviced by an external | |
168 | program, then communicates through messages on stdin and stdout. | |
169 | ||
170 | %description authpipe -l pl.UTF-8 | |
171 | Pakiet ten instaluje moduł authpipe, który jest ogólną wtyczką | |
172 | umożliwiającą obsługę żądań uwierzytelnienia przez zewnętrzny program | |
173 | komunikujący się poprzez wiadomości wysyłane na stdin i stdout. | |
174 | ||
175 | %package authsqlite | |
176 | Summary: SQLite support for the Courier authentication library | |
177 | Summary(pl.UTF-8): Obsługa SQLite dla biblioteki uwierzytelniania Couriera | |
178 | Group: Networking/Daemons | |
179 | Requires(pre,postun): sed >= 4.0 | |
180 | Requires: %{name} = %{version}-%{release} | |
181 | ||
182 | %description authsqlite | |
183 | This package installs SQLite support for the Courier authentication | |
184 | library. Install this package in order to be able to authenticate | |
185 | using SQLite. | |
186 | ||
187 | %description authsqlite -l pl.UTF-8 | |
188 | Ten pakiet dodaje obsługę SQLite do biblioteki uwierzytelniania | |
189 | Couriera. Należy go zainstalować aby móc uwierzytelniać się z użyciem | |
190 | SQLite. | |
191 | ||
192 | %package authuserdb | |
193 | Summary: Userdb support for the Courier authentication library | |
194 | Summary(pl.UTF-8): Obsługa userdb dla biblioteki uwierzytelniania Couriera | |
195 | Group: Networking/Daemons | |
196 | Requires(pre,postun): sed >= 4.0 | |
197 | Requires: %{name} = %{version}-%{release} | |
198 | Obsoletes: courier-authlib-userdb | |
199 | Obsoletes: courier-imap-userdb | |
200 | Obsoletes: sqwebmail-auth-userdb | |
201 | ||
202 | %description authuserdb | |
203 | This package installs the userdb support for the Courier | |
204 | authentication library. Userdb is a simple way to manage virtual mail | |
205 | accounts using a GDBM-based database file. | |
206 | ||
207 | Install this package in order to be able to authenticate with userdb. | |
208 | ||
209 | %description authuserdb -l pl.UTF-8 | |
210 | Ten pakiet dodaje obsługę userdb do biblioteki uwierzytelniania | |
211 | Couriera. Userdb to prosty sposób zarządzania wirtualnymi kontami | |
212 | pocztowymi przy użyciu pliku bazy danych opartej na GDBM. | |
213 | ||
214 | Należy go zainstalować aby móc uwierzytelniać się z użyciem userdb. | |
215 | ||
216 | %package -n openldap-schema-courier | |
217 | Summary: Courier LDAP schema | |
218 | Summary(pl.UTF-8): Schemat LDAP Couriera | |
219 | Group: Networking/Daemons | |
220 | Requires(post,postun): sed >= 4.0 | |
221 | Requires: openldap-servers | |
222 | Requires: sed >= 4.0 | |
223 | %if "%{_rpmversion}" >= "5" | |
224 | BuildArch: noarch | |
225 | %endif | |
226 | ||
227 | %description -n openldap-schema-courier | |
228 | This package contains Courier authldap.schema for openldap. | |
229 | ||
230 | %description -n openldap-schema-courier -l pl.UTF-8 | |
231 | Ten pakiet zawiera schemat Couriera authldap.schema dla openldapa. | |
232 | ||
233 | %prep | |
234 | %setup -q | |
235 | %patch0 -p1 | |
236 | %patch1 -p1 | |
237 | %patch2 -p1 | |
238 | %patch3 -p1 | |
239 | ||
240 | %build | |
241 | # Change Makefile.am files and force recreate Makefile.in's. | |
242 | OLDDIR=`pwd` | |
243 | find -type f -a \( -name configure.in -o -name configure.ac \) | while read FILE; do | |
244 | cd "`dirname "$FILE"`" | |
245 | ||
246 | if [ -f Makefile.am ]; then | |
247 | sed -i -e '/_[L]DFLAGS=-static/d' Makefile.am | |
248 | fi | |
249 | ||
250 | %{__libtoolize} | |
251 | %{__aclocal} | |
252 | %{__autoconf} | |
253 | if grep -q AC_CONFIG_HEADER configure.in; then | |
254 | %{__autoheader} | |
255 | fi | |
256 | %{__automake} | |
257 | ||
258 | cd "$OLDDIR" | |
259 | done | |
260 | ||
261 | %configure \ | |
262 | --disable-ltdl-install \ | |
263 | %{!?with_ldap:--without-authldap} \ | |
264 | --with-db=db \ | |
265 | --with-mailuser=daemon \ | |
266 | --with-mailgroup=daemon | |
267 | ||
268 | %{__make} -j1 \ | |
269 | LDFLAGS="%{rpmldflags} -lcrypt" | |
270 | ||
271 | %install | |
272 | rm -rf $RPM_BUILD_ROOT | |
273 | ||
274 | %{__make} -j1 install \ | |
275 | DESTDIR=$RPM_BUILD_ROOT | |
276 | ||
277 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/authlib/userdb,%{schemadir},%{_bindir}} | |
278 | ||
279 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-authlib | |
280 | cp -p authldap.schema $RPM_BUILD_ROOT%{schemadir}/courier.schema | |
281 | install -p makedat/makedat $RPM_BUILD_ROOT%{_bindir}/makedat | |
282 | ||
283 | # make config files | |
284 | ./sysconftool $RPM_BUILD_ROOT%{_sysconfdir}/authlib/*.dist | |
285 | %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/authlib/*.dist | |
286 | ||
287 | touch $RPM_BUILD_ROOT%{_localstatedir}/spool/authdaemon/socket | |
288 | ||
289 | # remove static library - for now | |
290 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/courier-authlib/*.a | |
291 | ||
292 | %clean | |
293 | rm -rf $RPM_BUILD_ROOT | |
294 | ||
295 | %post | |
296 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
297 | /sbin/chkconfig --add courier-authlib | |
298 | ||
299 | %service courier-authlib restart "authlib daemon" | |
300 | ||
301 | %preun | |
302 | if [ "$1" = "0" ]; then | |
303 | /sbin/chkconfig --del courier-authlib | |
304 | %service courier-authlib stop | |
305 | fi | |
306 | ||
307 | %postun | |
308 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
309 | ||
310 | %post libs | |
311 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
312 | ||
313 | %postun libs | |
314 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
315 | ||
316 | %post authldap | |
317 | if [ "$1" = 1 ]; then | |
318 | # add to authmodulelist list if package is first installed | |
319 | %{__sed} -i -e '/^authmodulelist=/{/\bauthldap\b/!s/"$/ authldap"/}' /etc/authlib/authdaemonrc | |
320 | fi | |
321 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
322 | %service -q courier-authlib restart | |
323 | ||
324 | %postun authldap | |
325 | if [ "$1" = 0 ]; then | |
326 | # remove from authmodulelist if package is removed | |
327 | %{__sed} -i -e '/^authmodulelist=/{s/ \?\bauthldap\b \?//}' /etc/authlib/authdaemonrc | |
328 | fi | |
329 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
330 | %service -q courier-authlib restart | |
331 | ||
332 | %post authmysql | |
333 | if [ "$1" = 1 ]; then | |
334 | # add to authmodulelist list if package is first installed | |
335 | %{__sed} -i -e '/^authmodulelist=/{/\bauthmysql\b/!s/"$/ authmysql"/}' /etc/authlib/authdaemonrc | |
336 | fi | |
337 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
338 | %service -q courier-authlib restart | |
339 | ||
340 | %postun authmysql | |
341 | if [ "$1" = 0 ]; then | |
342 | # remove from authmodulelist if package is removed | |
343 | %{__sed} -i -e '/^authmodulelist=/{s/ \?\bauthmysql\b \?//}' /etc/authlib/authdaemonrc | |
344 | fi | |
345 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
346 | %service -q courier-authlib restart | |
347 | ||
348 | %post authpgsql | |
349 | if [ "$1" = 1 ]; then | |
350 | # add to authmodulelist list if package is first installed | |
351 | %{__sed} -i -e '/^authmodulelist=/{/\bauthpgsql\b/!s/"$/ authpgsql"/}' /etc/authlib/authdaemonrc | |
352 | fi | |
353 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
354 | %service -q courier-authlib restart | |
355 | ||
356 | %postun authpgsql | |
357 | if [ "$1" = 0 ]; then | |
358 | # remove from authmodulelist if package is removed | |
359 | %{__sed} -i -e '/^authmodulelist=/{s/ \?\bauthpgsql\b \?//}' /etc/authlib/authdaemonrc | |
360 | fi | |
361 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
362 | %service -q courier-authlib restart | |
363 | ||
364 | %post authpipe | |
365 | if [ "$1" = 1 ]; then | |
366 | # add to authmodulelist list if package is first installed | |
367 | %{__sed} -i -e '/^authmodulelist=/{/\bpipe\b/!s/"$/ pipe"/}' /etc/authlib/authdaemonrc | |
368 | fi | |
369 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
370 | %service -q courier-authlib restart | |
371 | ||
372 | %postun authpipe | |
373 | if [ "$1" = 0 ]; then | |
374 | # remove from authmodulelist if package is removed | |
375 | %{__sed} -i -e '/^authmodulelist=/{s/ \?\bpipe\b \?//}' /etc/authlib/authdaemonrc | |
376 | fi | |
377 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
378 | %service -q courier-authlib restart | |
379 | ||
380 | %post authsqlite | |
381 | if [ "$1" = 1 ]; then | |
382 | # add to authmodulelist list if package is first installed | |
383 | %{__sed} -i -e '/^authmodulelist=/{/\bauthsqlite\b/!s/"$/ authsqlite"/}' /etc/authlib/authdaemonrc | |
384 | fi | |
385 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
386 | %service -q courier-authlib restart | |
387 | ||
388 | %postun authsqlite | |
389 | if [ "$1" = 0 ]; then | |
390 | # remove from authmodulelist if package is removed | |
391 | %{__sed} -i -e '/^authmodulelist=/{s/ \?\bauthsqlite\b \?//}' /etc/authlib/authdaemonrc | |
392 | fi | |
393 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
394 | %service -q courier-authlib restart | |
395 | ||
396 | %post authuserdb | |
397 | if [ "$1" = 1 ]; then | |
398 | # add to authmodulelist list if package is first installed | |
399 | %{__sed} -i -e '/^authmodulelist=/{/\buserdb\b/!s/"$/ userdb"/}' /etc/authlib/authdaemonrc | |
400 | fi | |
401 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
402 | %service -q courier-authlib restart | |
403 | ||
404 | %postun authuserdb | |
405 | if [ "$1" = 0 ]; then | |
406 | # remove from authmodulelist if package is removed | |
407 | %{__sed} -i -e '/^authmodulelist=/{s/ \?\buserdb\b \?//}' /etc/authlib/authdaemonrc | |
408 | fi | |
409 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
410 | %service -q courier-authlib restart | |
411 | ||
412 | %post -n openldap-schema-courier | |
413 | %openldap_schema_register %{schemadir}/courier.schema -d misc,nis,cosine | |
414 | %service -q ldap restart | |
415 | ||
416 | %postun -n openldap-schema-courier | |
417 | if [ "$1" = "0" ]; then | |
418 | %openldap_schema_unregister %{schemadir}/courier.schema | |
419 | %service -q ldap restart | |
420 | fi | |
421 | ||
422 | %triggerin -- courier < 0.48 | |
423 | if [ -f /etc/courier/authdaemonrc ]; then | |
424 | . /etc/courier/authdaemonrc | |
425 | ||
426 | %{__sed} -i s/^authmodulelist=.*/"authmodulelist=\"`echo $authmodulelist \ | |
427 | | sed s/'authcram'/''/ | sed s/' '/' '/`\""/ /etc/authlib/authdaemonrc | |
428 | %{__sed} -i s/^authmodulelistorig=.*/"authmodulelistorig=\"`echo $authmodulelistorig\ | |
429 | | sed s/'authcram'/''/ | sed s/' '/' '/`\""/ /etc/authlib/authdaemonrc | |
430 | %{__sed} -i s/^daemons=.*/"daemons=$daemons"/ /etc/authlib/authdaemonrc | |
431 | fi | |
432 | if [ -f /var/lock/subsys/courier ]; then | |
433 | if [ -f /var/spool/courier/authdaemon/pid ]; then | |
434 | kill `cat /var/spool/courier/authdaemon/pid` | |
435 | rm -f /var/spool/courier/authdaemon/* | |
436 | /sbin/service courier-authlib start | |
437 | fi | |
438 | fi | |
439 | ||
440 | %triggerin -- courier-imap-common < 4.0.0 | |
441 | if [ -f /etc/courier-imap/authdaemonrc ]; then | |
442 | . /etc/courier-imap/authdaemonrc | |
443 | ||
444 | %{__sed} -i s/^authmodulelist=.*/"authmodulelist=\"`echo $authmodulelist \ | |
445 | | sed s/'authcram'/''/ | sed s/' '/' '/`\""/ /etc/authlib/authdaemonrc | |
446 | %{__sed} -i s/^authmodulelistorig=.*/"authmodulelistorig=\"`echo $authmodulelistorig\ | |
447 | | sed s/'authcram'/''/ | sed s/' '/' '/`\""/ /etc/authlib/authdaemonrc | |
448 | %{__sed} -i s/^daemons=.*/"daemons=$daemons"/ /etc/authlib/authdaemonrc | |
449 | fi | |
450 | if [ -f /var/lock/subsys/courier-imap ]; then | |
451 | if [ -f /var/lib/authdaemon/pid ]; then | |
452 | kill `cat /var/lib/authdaemon/pid` | |
453 | rm -f /var/lib/authdaemon/* | |
454 | /sbin/service courier-authlib start | |
455 | fi | |
456 | fi | |
457 | ||
458 | %triggerin -- sqwebmail < 5.0.0 | |
459 | if [ -f /etc/sqwebmail/authdaemonrc ]; then | |
460 | . /etc/sqwebmail/authdaemonrc | |
461 | ||
462 | %{__sed} -i s/^authmodulelist=.*/"authmodulelist=\"`echo $authmodulelist \ | |
463 | | sed s/'authcram'/''/ | sed s/' '/' '/`\""/ /etc/authlib/authdaemonrc | |
464 | %{__sed} -i s/^authmodulelistorig=.*/"authmodulelistorig=\"`echo $authmodulelistorig\ | |
465 | | sed s/'authcram'/''/ | sed s/' '/' '/`\""/ /etc/authlib/authdaemonrc | |
466 | %{__sed} -i s/^daemons=.*/"daemons=$daemons"/ /etc/authlib/authdaemonrc | |
467 | fi | |
468 | if [ -f /var/lock/subsys/sqwebmail ]; then | |
469 | if [ -f /var/spool/sqwebmail/authdaemon/pid ]; then | |
470 | kill `cat /var/spool/sqwebmail/authdaemon/pid` | |
471 | rm -f /var/spool/sqwebmail/authdaemon/* | |
472 | /sbin/service courier-authlib start | |
473 | fi | |
474 | fi | |
475 | ||
476 | %triggerin -n %{name}-authldap -- courier-authldap < 0.48 | |
477 | if [ -f /etc/courier/authldaprc ]; then | |
478 | mv -f /etc/authlib/authldaprc /etc/authlib/authldaprc.new | |
479 | cp -f /etc/courier/authldaprc /etc/authlib/authldaprc | |
480 | %service -q courier-authlib restart | |
481 | fi | |
482 | ||
483 | %triggerin -n %{name}-authldap -- courier-imap-authldap < 4.0.0 | |
484 | if [ -f /etc/courier-imap/authldaprc ]; then | |
485 | mv -f /etc/authlib/authldaprc /etc/authlib/authldaprc.new | |
486 | cp -f /etc/courier-imap/authldaprc /etc/authlib/authldaprc | |
487 | %service -q courier-authlib restart | |
488 | fi | |
489 | ||
490 | %triggerin -n %{name}-authldap -- sqwebmail-auth-ldap < 5.0.0 | |
491 | if [ -f /etc/sqwebmail/authldaprc ]; then | |
492 | mv -f /etc/authlib/authldaprc /etc/authlib/authldaprc.new | |
493 | cp -f /etc/sqwebmail/authldaprc /etc/authlib/authldaprc | |
494 | %service -q courier-authlib restart | |
495 | fi | |
496 | ||
497 | %triggerin -n %{name}-authmysql -- courier-authmysql < 0.48 | |
498 | if [ -f /etc/courier/authmysqlrc ]; then | |
499 | mv -f /etc/authlib/authmysqlrc /etc/authlib/authmysqlrc.new | |
500 | cp -f /etc/courier/authmysqlrc /etc/authlib/authmysqlrc | |
501 | %service -q courier-authlib restart | |
502 | fi | |
503 | ||
504 | %triggerin -n %{name}-authmysql -- courier-imap-authmysql < 4.0.0 | |
505 | if [ -f /etc/courier-imap/authmysqlrc ]; then | |
506 | mv -f /etc/authlib/authmysqlrc /etc/authlib/authmysqlrc.new | |
507 | cp -f /etc/courier-imap/authmysqlrc /etc/authlib/authmysqlrc | |
508 | %service -q courier-authlib restart | |
509 | fi | |
510 | ||
511 | %triggerin -n %{name}-authmysql -- sqwebmail-auth-mysql < 5.0.0 | |
512 | if [ -f /etc/sqwebmail/authmysqlrc ]; then | |
513 | mv -f /etc/authlib/authmysqlrc /etc/authlib/authmysqlrc.new | |
514 | cp -f /etc/sqwebmail/authmysqlrc /etc/authlib/authmysqlrc | |
515 | %service -q courier-authlib restart | |
516 | fi | |
517 | ||
518 | %triggerin -n %{name}-authpgsql -- courier-authpgsql < 0.48 | |
519 | if [ -f /etc/courier/authpgsqlrc ]; then | |
520 | mv -f /etc/authlib/authpgsqlrc /etc/authlib/authpgsqlrc.new | |
521 | cp -f /etc/courier/authpgsqlrc /etc/authlib/authpgsqlrc | |
522 | %service -q courier-authlib restart | |
523 | fi | |
524 | ||
525 | %triggerin -n %{name}-authpgsql -- courier-imap-authpgsql < 4.0.0 | |
526 | if [ -f /etc/courier-imap/authpgsqlrc ]; then | |
527 | mv -f /etc/authlib/authpgsqlrc /etc/authlib/authpgsqlrc.new | |
528 | cp -f /etc/courier-imap/authpgsqlrc /etc/authlib/authpgsqlrc | |
529 | %service -q courier-authlib restart | |
530 | fi | |
531 | ||
532 | %triggerin -n %{name}-authpgsql -- sqwebmail-auth-pgsql < 5.0.0 | |
533 | if [ -f /etc/sqwebmail/authpgsqlrc ]; then | |
534 | mv -f /etc/authlib/authpgsqlrc /etc/authlib/authpgsqlrc.new | |
535 | cp -f /etc/sqwebmail/authpgsqlrc /etc/authlib/authpgsqlrc | |
536 | %service -q courier-authlib restart | |
537 | fi | |
538 | ||
539 | %triggerin -n %{name}-authuserdb -- courier < 0.48 | |
540 | if [ -d /etc/courier/userdb ]; then | |
541 | mv -f /etc/courier/userdb/* /etc/authlib/userdb | |
542 | makeuserdb | |
543 | fi | |
544 | if [ -f /etc/courier/userdb ]; then | |
545 | mv -f /etc/courier/userdb /etc/authlib/userdb | |
546 | makeuserdb | |
547 | fi | |
548 | ||
549 | %triggerin -n %{name}-authuserdb -- courier-imap-userdb < 4.0.0 | |
550 | if [ -d /etc/courier-imap/userdb ]; then | |
551 | mv -f /etc/courier-imap/userdb/* /etc/authlib/userdb | |
552 | makeuserdb | |
553 | fi | |
554 | if [ -f /etc/courier-imap/userdb ]; then | |
555 | mv -f /etc/courier-imap/userdb /etc/authlib/userdb | |
556 | makeuserdb | |
557 | fi | |
558 | ||
559 | %triggerin -n %{name}-authuserdb -- sqwebmail-auth-userdb < 5.0.0 | |
560 | if [ -d /etc/sqwebmail/userdb ]; then | |
561 | mv -f /etc/sqwebmail/userdb/* /etc/authlib/userdb | |
562 | makeuserdb | |
563 | fi | |
564 | if [ -f /etc/sqwebmail/userdb ]; then | |
565 | mv -f /etc/sqwebmail/userdb /etc/authlib/userdb | |
566 | makeuserdb | |
567 | fi | |
568 | ||
569 | %files | |
570 | %defattr(644,root,root,755) | |
571 | # COPYING contains only note | |
572 | %doc AUTHORS COPYING ChangeLog NEWS README README*html README.authmysql.myownquery authldap.schema | |
573 | %attr(755,root,root) %{_bindir}/makedat | |
574 | %dir %{_sysconfdir}/authlib | |
575 | %attr(754,root,root) /etc/rc.d/init.d/courier-authlib | |
576 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authdaemonrc | |
577 | %attr(755,root,root) %{_libexecdir}/courier-authlib/authdaemond | |
578 | %attr(755,root,root) %{_libexecdir}/courier-authlib/authsystem.passwd | |
579 | %attr(755,root,root) %{_libexecdir}/courier-authlib/makedatprog | |
580 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthcustom.so | |
581 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthcustom.so.0 | |
582 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthpam.so | |
583 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthpam.so.0 | |
584 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauthcommon.so | |
585 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libcourierauthcommon.so.0 | |
586 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauthsasl.so | |
587 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libcourierauthsasl.so.0 | |
588 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauthsaslclient.so | |
589 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libcourierauthsaslclient.so.0 | |
590 | %{_libexecdir}/courier-authlib/libauthcustom.la | |
591 | %{_libexecdir}/courier-authlib/libauthpam.la | |
592 | %{_libexecdir}/courier-authlib/libcourierauth.la | |
593 | %{_libexecdir}/courier-authlib/libcourierauthcommon.la | |
594 | %{_libexecdir}/courier-authlib/libcourierauthsasl.la | |
595 | %{_libexecdir}/courier-authlib/libcourierauthsaslclient.la | |
596 | %attr(770,root,daemon) %dir %{_localstatedir}/spool/authdaemon | |
597 | %attr(777,root,root) %ghost %{_localstatedir}/spool/authdaemon/socket | |
598 | %attr(755,root,root) %{_sbindir}/authdaemond | |
599 | %attr(755,root,root) %{_sbindir}/authenumerate | |
600 | %attr(755,root,root) %{_sbindir}/authpasswd | |
601 | %attr(755,root,root) %{_sbindir}/authtest | |
602 | %attr(755,root,root) %{_sbindir}/courierlogger | |
603 | %{_mandir}/man1/authpasswd.1* | |
604 | %{_mandir}/man1/authtest.1* | |
605 | %{_mandir}/man1/courierlogger.1* | |
606 | ||
607 | %files libs | |
608 | %defattr(644,root,root,755) | |
609 | %dir %{_libexecdir}/courier-authlib | |
610 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauth.so | |
611 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libcourierauth.so.0 | |
612 | ||
613 | %files devel | |
614 | %defattr(644,root,root,755) | |
615 | %doc authlib.html auth_*.html | |
616 | %attr(755,root,root) %{_bindir}/courierauthconfig | |
617 | %{_includedir}/courier_auth_config.h | |
618 | %{_includedir}/courierauth*.h | |
619 | %{_mandir}/man3/auth_*.3* | |
620 | %{_mandir}/man3/authlib.3* | |
621 | ||
622 | %if %{with ldap} | |
623 | %files authldap | |
624 | %defattr(644,root,root,755) | |
625 | %doc authldap.schema README.ldap | |
626 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authldaprc | |
627 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthldap.so | |
628 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthldap.so.0 | |
629 | %{_libexecdir}/courier-authlib/libauthldap.la | |
630 | %endif | |
631 | ||
632 | %files authmysql | |
633 | %defattr(644,root,root,755) | |
634 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authmysqlrc | |
635 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthmysql.so | |
636 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthmysql.so.0 | |
637 | %{_libexecdir}/courier-authlib/libauthmysql.la | |
638 | ||
639 | %files authpgsql | |
640 | %defattr(644,root,root,755) | |
641 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authpgsqlrc | |
642 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthpgsql.so | |
643 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthpgsql.so.0 | |
644 | %{_libexecdir}/courier-authlib/libauthpgsql.la | |
645 | ||
646 | %files authpipe | |
647 | %defattr(644,root,root,755) | |
648 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthpipe.so | |
649 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthpipe.so.0 | |
650 | %{_libexecdir}/courier-authlib/libauthpipe.la | |
651 | ||
652 | %files authsqlite | |
653 | %defattr(644,root,root,755) | |
654 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authsqliterc | |
655 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthsqlite.so | |
656 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthsqlite.so.0 | |
657 | %{_libexecdir}/courier-authlib/libauthsqlite.la | |
658 | ||
659 | %files authuserdb | |
660 | %defattr(644,root,root,755) | |
661 | %attr(700,root,root) %dir %{_sysconfdir}/authlib/userdb | |
662 | %attr(755,root,root) %{_sbindir}/makeuserdb | |
663 | %attr(755,root,root) %{_sbindir}/pw2userdb | |
664 | %attr(755,root,root) %{_sbindir}/userdb | |
665 | %attr(755,root,root) %{_sbindir}/userdb-test-cram-md5 | |
666 | %attr(755,root,root) %{_sbindir}/userdbpw | |
667 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthuserdb.so | |
668 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthuserdb.so.0 | |
669 | %{_libexecdir}/courier-authlib/libauthuserdb.la | |
670 | %{_mandir}/man8/makeuserdb.8* | |
671 | %{_mandir}/man8/userdb.8* | |
672 | %{_mandir}/man8/userdbpw.8* | |
673 | ||
674 | %if %{with ldap} | |
675 | %files -n openldap-schema-courier | |
676 | %defattr(644,root,root,755) | |
677 | %{schemadir}/courier.schema | |
678 | %endif |