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