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