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