]>
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 |
b22413c1 | 8 | Version: 0.65.0 |
3ab2ebe1 | 9 | Release: 3 |
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 |
b22413c1 | 13 | # Source0-md5: e9287e33b0e70ea3745517b4d719948d |
aa89654a | 14 | Source1: %{name}.init |
7ab176aa | 15 | Patch0: %{name}-md5sum-passwords.patch |
16 | Patch1: %{name}-authdaemonrc.patch | |
17 | Patch2: %{name}-nostatic.patch | |
18 | Patch3: %{name}-ltdl.patch | |
7c5b4b59 | 19 | URL: http://www.courier-mta.org/authlib/ |
f7916935 | 20 | BuildRequires: autoconf >= 2.63 |
7c5b4b59 AA |
21 | BuildRequires: automake |
22 | BuildRequires: db-devel | |
8cd33d7f | 23 | BuildRequires: expect |
f7916935 JB |
24 | BuildRequires: libltdl-devel >= 2:2 |
25 | BuildRequires: libtool >= 2:2 | |
8cd33d7f | 26 | BuildRequires: mysql-devel |
905c8d0b | 27 | %{?with_ldap:BuildRequires: openldap-devel >= 2.3.0} |
8cd33d7f AA |
28 | BuildRequires: pam-devel |
29 | BuildRequires: postgresql-devel | |
259e6fd9 | 30 | BuildRequires: rpmbuild(macros) >= 1.304 |
b22413c1 | 31 | BuildRequires: sqlite3-devel |
b556d988 | 32 | BuildRequires: sysconftool |
8cd33d7f | 33 | BuildRequires: zlib-devel |
109ce427 | 34 | Requires(post,postun): /sbin/ldconfig |
df8ebb36 | 35 | Requires(post,preun): /sbin/chkconfig |
109ce427 ER |
36 | Requires: %{name}-libs = %{version}-%{release} |
37 | Requires: /sbin/chkconfig | |
38 | Requires: rc-scripts | |
7c5b4b59 AA |
39 | Obsoletes: sqwebmail-auth-cram |
40 | Obsoletes: sqwebmail-auth-pam | |
41 | Obsoletes: sqwebmail-auth-pwd | |
42 | Obsoletes: sqwebmail-auth-shadow | |
8cd33d7f AA |
43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
44 | ||
c259485d ER |
45 | %define schemadir /usr/share/openldap/schema |
46 | ||
8cd33d7f AA |
47 | %description |
48 | The Courier authentication library provides authentication services | |
49 | for other Courier applications. | |
50 | ||
61e470ec JR |
51 | %description -l pl.UTF-8 |
52 | Biblioteka uwierzytelniania Couriera dostarcza usługi uwierzytelniania | |
5626c9aa | 53 | dla innych aplikacji Couriera. |
8cd33d7f | 54 | |
109ce427 ER |
55 | %package libs |
56 | Summary: Courier authentication library | |
868d4675 | 57 | Summary(pl.UTF-8): Biblioteka uwierzytelniania Couriera |
109ce427 ER |
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 | ||
61e470ec JR |
68 | %description libs -l pl.UTF-8 |
69 | Biblioteka uwierzytelniania Couriera dostarcza usługi uwierzytelniania | |
109ce427 ER |
70 | dla innych aplikacji Couriera. |
71 | ||
8cd33d7f | 72 | %package devel |
5626c9aa | 73 | Summary: Development files for the Courier authentication library |
868d4675 | 74 | Summary(pl.UTF-8): Pliki programistyczne dla biblioteki uwierzytelniania Couriera |
8cd33d7f AA |
75 | Group: Development/Libraries |
76 | Requires: %{name} = %{version}-%{release} | |
905c8d0b | 77 | %{?with_ldap:Requires: %{name}-authldap = %{version}-%{release}} |
7c5b4b59 AA |
78 | Requires: %{name}-authmysql = %{version}-%{release} |
79 | Requires: %{name}-authpgsql = %{version}-%{release} | |
a25e80b2 | 80 | Requires: %{name}-authpipe = %{version}-%{release} |
70773c4e | 81 | Requires: %{name}-authuserdb = %{version}-%{release} |
8cd33d7f AA |
82 | |
83 | %description devel | |
5626c9aa JB |
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. | |
8cd33d7f | 89 | |
61e470ec | 90 | %description devel -l pl.UTF-8 |
5626c9aa | 91 | Ten pakiet zawiera pliki programistyczne potrzebne do kompilacji |
61e470ec JR |
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. | |
8cd33d7f AA |
96 | |
97 | %package authldap | |
7c5b4b59 | 98 | Summary: LDAP support for the Courier authentication library |
868d4675 | 99 | Summary(pl.UTF-8): Obsługa LDAP dla biblioteki uwierzytelniania Couriera |
7c5b4b59 | 100 | Group: Networking/Daemons |
99b3aadf | 101 | Requires(pre,postun): sed >= 4.0 |
109ce427 | 102 | Requires: %{name} = %{version}-%{release} |
7c5b4b59 AA |
103 | Obsoletes: courier-authldap |
104 | Obsoletes: courier-imap-authldap | |
105 | Obsoletes: sqwebmail-auth-ldap | |
8cd33d7f AA |
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 | ||
61e470ec JR |
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 | |
5626c9aa | 115 | LDAP. |
8cd33d7f AA |
116 | |
117 | %package authmysql | |
5626c9aa | 118 | Summary: MySQL support for the Courier authentication library |
868d4675 | 119 | Summary(pl.UTF-8): Obsługa MySQL dla biblioteki uwierzytelniania Couriera |
8cd33d7f | 120 | Group: Networking/Daemons |
99b3aadf | 121 | Requires(pre,postun): sed >= 4.0 |
109ce427 | 122 | Requires: %{name} = %{version}-%{release} |
7c5b4b59 AA |
123 | Obsoletes: courier-authmysql |
124 | Obsoletes: courier-imap-authmysql | |
125 | Obsoletes: sqwebmail-auth-mysql | |
8cd33d7f AA |
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 | ||
61e470ec JR |
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 | |
5626c9aa | 135 | MySQL. |
8cd33d7f AA |
136 | |
137 | %package authpgsql | |
138 | Summary: PostgreSQL support for the Courier authentication library | |
868d4675 | 139 | Summary(pl.UTF-8): Obsługa PostgreSQL dla biblioteki uwierzytelniania Couriera |
8cd33d7f | 140 | Group: Networking/Daemons |
99b3aadf | 141 | Requires(pre,postun): sed >= 4.0 |
109ce427 | 142 | Requires: %{name} = %{version}-%{release} |
7c5b4b59 AA |
143 | Obsoletes: courier-authpgsql |
144 | Obsoletes: courier-imap-authpgsql | |
145 | Obsoletes: sqwebmail-auth-pgsql | |
8cd33d7f AA |
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 | ||
61e470ec JR |
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 | |
5626c9aa | 155 | PostgreSQL. |
8cd33d7f | 156 | |
b22413c1 MK |
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 | ||
a25e80b2 | 192 | %package authuserdb |
7c5b4b59 | 193 | Summary: Userdb support for the Courier authentication library |
868d4675 | 194 | Summary(pl.UTF-8): Obsługa userdb dla biblioteki uwierzytelniania Couriera |
7c5b4b59 | 195 | Group: Networking/Daemons |
99b3aadf | 196 | Requires(pre,postun): sed >= 4.0 |
109ce427 | 197 | Requires: %{name} = %{version}-%{release} |
a25e80b2 | 198 | Obsoletes: courier-authlib-userdb |
7c5b4b59 AA |
199 | Obsoletes: courier-imap-userdb |
200 | Obsoletes: sqwebmail-auth-userdb | |
8cd33d7f | 201 | |
a25e80b2 | 202 | %description authuserdb |
8cd33d7f AA |
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 | ||
a25e80b2 | 209 | %description authuserdb -l pl.UTF-8 |
61e470ec JR |
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. | |
5626c9aa | 213 | |
61e470ec | 214 | Należy go zainstalować aby móc uwierzytelniać się z użyciem userdb. |
8cd33d7f | 215 | |
c259485d ER |
216 | %package -n openldap-schema-courier |
217 | Summary: Courier LDAP schema | |
868d4675 | 218 | Summary(pl.UTF-8): Schemat LDAP Couriera |
c259485d ER |
219 | Group: Networking/Daemons |
220 | Requires(post,postun): sed >= 4.0 | |
221 | Requires: openldap-servers | |
109ce427 | 222 | Requires: sed >= 4.0 |
70773c4e ER |
223 | %if "%{_rpmversion}" >= "5" |
224 | BuildArch: noarch | |
225 | %endif | |
c259485d ER |
226 | |
227 | %description -n openldap-schema-courier | |
228 | This package contains Courier authldap.schema for openldap. | |
229 | ||
61e470ec | 230 | %description -n openldap-schema-courier -l pl.UTF-8 |
49c922ca JB |
231 | Ten pakiet zawiera schemat Couriera authldap.schema dla openldapa. |
232 | ||
8cd33d7f | 233 | %prep |
7c5b4b59 AA |
234 | %setup -q |
235 | %patch0 -p1 | |
2a2a0b32 | 236 | %patch1 -p1 |
99b3aadf | 237 | %patch2 -p1 |
eae3d21d | 238 | %patch3 -p1 |
dfa792b6 | 239 | |
8cd33d7f | 240 | %build |
a682a4df | 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"`" | |
64587e2b | 245 | |
a682a4df | 246 | if [ -f Makefile.am ]; then |
247 | sed -i -e '/_[L]DFLAGS=-static/d' Makefile.am | |
248 | fi | |
64587e2b | 249 | |
eae3d21d ER |
250 | %{__libtoolize} |
251 | %{__aclocal} | |
252 | %{__autoconf} | |
a682a4df | 253 | if grep -q AC_CONFIG_HEADER configure.in; then |
254 | %{__autoheader} | |
255 | fi | |
eae3d21d | 256 | %{__automake} |
64587e2b | 257 | |
a682a4df | 258 | cd "$OLDDIR" |
eae3d21d ER |
259 | done |
260 | ||
7c5b4b59 | 261 | %configure \ |
f7916935 | 262 | --disable-ltdl-install \ |
905c8d0b | 263 | %{!?with_ldap:--without-authldap} \ |
7c5b4b59 AA |
264 | --with-db=db \ |
265 | --with-mailuser=daemon \ | |
266 | --with-mailgroup=daemon | |
8cd33d7f | 267 | |
a682a4df | 268 | %{__make} -j1 \ |
7ffb40c2 | 269 | LDFLAGS="%{rpmldflags} -lcrypt" |
8cd33d7f AA |
270 | |
271 | %install | |
272 | rm -rf $RPM_BUILD_ROOT | |
273 | ||
a682a4df | 274 | %{__make} -j1 install \ |
8cd33d7f AA |
275 | DESTDIR=$RPM_BUILD_ROOT |
276 | ||
eae3d21d | 277 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/authlib/userdb,%{schemadir},%{_bindir}} |
8cd33d7f | 278 | |
70773c4e ER |
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 | |
8cd33d7f AA |
282 | |
283 | # make config files | |
284 | ./sysconftool $RPM_BUILD_ROOT%{_sysconfdir}/authlib/*.dist | |
f7916935 | 285 | %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/authlib/*.dist |
8cd33d7f | 286 | |
73c4092d ER |
287 | touch $RPM_BUILD_ROOT%{_localstatedir}/spool/authdaemon/socket |
288 | ||
8cd33d7f | 289 | # remove static library - for now |
f7916935 | 290 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/courier-authlib/*.a |
8cd33d7f | 291 | |
5626c9aa JB |
292 | %clean |
293 | rm -rf $RPM_BUILD_ROOT | |
294 | ||
8cd33d7f | 295 | %post |
7c5b4b59 | 296 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
8cd33d7f AA |
297 | /sbin/chkconfig --add courier-authlib |
298 | ||
24593e93 | 299 | %service courier-authlib restart "authlib daemon" |
8cd33d7f | 300 | |
7c5b4b59 | 301 | %preun |
5626c9aa | 302 | if [ "$1" = "0" ]; then |
8cd33d7f | 303 | /sbin/chkconfig --del courier-authlib |
24593e93 | 304 | %service courier-authlib stop |
7c5b4b59 AA |
305 | fi |
306 | ||
307 | %postun | |
308 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
309 | ||
109ce427 ER |
310 | %post libs |
311 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
312 | ||
313 | %postun libs | |
314 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
315 | ||
7c5b4b59 | 316 | %post authldap |
99b3aadf ER |
317 | if [ "$1" = 1 ]; then |
318 | # add to authmodulelist list if package is first installed | |
eae3d21d | 319 | %{__sed} -i -e '/^authmodulelist=/{/\bauthldap\b/!s/"$/ authldap"/}' /etc/authlib/authdaemonrc |
99b3aadf | 320 | fi |
7c5b4b59 | 321 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 322 | %service -q courier-authlib restart |
7c5b4b59 AA |
323 | |
324 | %postun authldap | |
99b3aadf ER |
325 | if [ "$1" = 0 ]; then |
326 | # remove from authmodulelist if package is removed | |
eae3d21d | 327 | %{__sed} -i -e '/^authmodulelist=/{s/ \?\bauthldap\b \?//}' /etc/authlib/authdaemonrc |
99b3aadf | 328 | fi |
7c5b4b59 | 329 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 330 | %service -q courier-authlib restart |
7c5b4b59 AA |
331 | |
332 | %post authmysql | |
99b3aadf ER |
333 | if [ "$1" = 1 ]; then |
334 | # add to authmodulelist list if package is first installed | |
eae3d21d | 335 | %{__sed} -i -e '/^authmodulelist=/{/\bauthmysql\b/!s/"$/ authmysql"/}' /etc/authlib/authdaemonrc |
99b3aadf | 336 | fi |
7c5b4b59 | 337 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 338 | %service -q courier-authlib restart |
7c5b4b59 AA |
339 | |
340 | %postun authmysql | |
99b3aadf ER |
341 | if [ "$1" = 0 ]; then |
342 | # remove from authmodulelist if package is removed | |
eae3d21d | 343 | %{__sed} -i -e '/^authmodulelist=/{s/ \?\bauthmysql\b \?//}' /etc/authlib/authdaemonrc |
99b3aadf | 344 | fi |
7c5b4b59 | 345 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 346 | %service -q courier-authlib restart |
7c5b4b59 AA |
347 | |
348 | %post authpgsql | |
99b3aadf ER |
349 | if [ "$1" = 1 ]; then |
350 | # add to authmodulelist list if package is first installed | |
eae3d21d | 351 | %{__sed} -i -e '/^authmodulelist=/{/\bauthpgsql\b/!s/"$/ authpgsql"/}' /etc/authlib/authdaemonrc |
99b3aadf | 352 | fi |
7c5b4b59 | 353 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 354 | %service -q courier-authlib restart |
7c5b4b59 AA |
355 | |
356 | %postun authpgsql | |
99b3aadf ER |
357 | if [ "$1" = 0 ]; then |
358 | # remove from authmodulelist if package is removed | |
eae3d21d | 359 | %{__sed} -i -e '/^authmodulelist=/{s/ \?\bauthpgsql\b \?//}' /etc/authlib/authdaemonrc |
99b3aadf | 360 | fi |
7c5b4b59 | 361 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 362 | %service -q courier-authlib restart |
7c5b4b59 | 363 | |
b22413c1 | 364 | %post authpipe |
99b3aadf ER |
365 | if [ "$1" = 1 ]; then |
366 | # add to authmodulelist list if package is first installed | |
b22413c1 | 367 | %{__sed} -i -e '/^authmodulelist=/{/\bpipe\b/!s/"$/ pipe"/}' /etc/authlib/authdaemonrc |
99b3aadf | 368 | fi |
7c5b4b59 | 369 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 370 | %service -q courier-authlib restart |
7c5b4b59 | 371 | |
b22413c1 | 372 | %postun authpipe |
99b3aadf ER |
373 | if [ "$1" = 0 ]; then |
374 | # remove from authmodulelist if package is removed | |
b22413c1 | 375 | %{__sed} -i -e '/^authmodulelist=/{s/ \?\bpipe\b \?//}' /etc/authlib/authdaemonrc |
99b3aadf | 376 | fi |
7c5b4b59 | 377 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 378 | %service -q courier-authlib restart |
7c5b4b59 | 379 | |
b22413c1 | 380 | %post authsqlite |
99b3aadf ER |
381 | if [ "$1" = 1 ]; then |
382 | # add to authmodulelist list if package is first installed | |
b22413c1 | 383 | %{__sed} -i -e '/^authmodulelist=/{/\bauthsqlite\b/!s/"$/ authsqlite"/}' /etc/authlib/authdaemonrc |
99b3aadf | 384 | fi |
8d3b74ac | 385 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 386 | %service -q courier-authlib restart |
8d3b74ac | 387 | |
b22413c1 | 388 | %postun authsqlite |
99b3aadf ER |
389 | if [ "$1" = 0 ]; then |
390 | # remove from authmodulelist if package is removed | |
b22413c1 MK |
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 | |
99b3aadf | 408 | fi |
8d3b74ac | 409 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 410 | %service -q courier-authlib restart |
8d3b74ac | 411 | |
c259485d | 412 | %post -n openldap-schema-courier |
3ab2ebe1 | 413 | %openldap_schema_register %{schemadir}/courier.schema -d misc,nis,cosine |
24593e93 | 414 | %service -q ldap restart |
c259485d ER |
415 | |
416 | %postun -n openldap-schema-courier | |
417 | if [ "$1" = "0" ]; then | |
259e6fd9 | 418 | %openldap_schema_unregister %{schemadir}/courier.schema |
24593e93 | 419 | %service -q ldap restart |
c259485d ER |
420 | fi |
421 | ||
7c5b4b59 AA |
422 | %triggerin -- courier < 0.48 |
423 | if [ -f /etc/courier/authdaemonrc ]; then | |
ec099892 | 424 | . /etc/courier/authdaemonrc |
7c5b4b59 | 425 | |
eae3d21d | 426 | %{__sed} -i s/^authmodulelist=.*/"authmodulelist=\"`echo $authmodulelist \ |
ec099892 | 427 | | sed s/'authcram'/''/ | sed s/' '/' '/`\""/ /etc/authlib/authdaemonrc |
eae3d21d | 428 | %{__sed} -i s/^authmodulelistorig=.*/"authmodulelistorig=\"`echo $authmodulelistorig\ |
ec099892 | 429 | | sed s/'authcram'/''/ | sed s/' '/' '/`\""/ /etc/authlib/authdaemonrc |
eae3d21d | 430 | %{__sed} -i s/^daemons=.*/"daemons=$daemons"/ /etc/authlib/authdaemonrc |
7c5b4b59 AA |
431 | fi |
432 | if [ -f /var/lock/subsys/courier ]; then | |
ec099892 ER |
433 | if [ -f /var/spool/courier/authdaemon/pid ]; then |
434 | kill `cat /var/spool/courier/authdaemon/pid` | |
435 | rm -f /var/spool/courier/authdaemon/* | |
24593e93 | 436 | /sbin/service courier-authlib start |
ec099892 | 437 | fi |
7c5b4b59 AA |
438 | fi |
439 | ||
440 | %triggerin -- courier-imap-common < 4.0.0 | |
441 | if [ -f /etc/courier-imap/authdaemonrc ]; then | |
ec099892 | 442 | . /etc/courier-imap/authdaemonrc |
7c5b4b59 | 443 | |
eae3d21d | 444 | %{__sed} -i s/^authmodulelist=.*/"authmodulelist=\"`echo $authmodulelist \ |
ec099892 | 445 | | sed s/'authcram'/''/ | sed s/' '/' '/`\""/ /etc/authlib/authdaemonrc |
eae3d21d | 446 | %{__sed} -i s/^authmodulelistorig=.*/"authmodulelistorig=\"`echo $authmodulelistorig\ |
ec099892 | 447 | | sed s/'authcram'/''/ | sed s/' '/' '/`\""/ /etc/authlib/authdaemonrc |
eae3d21d | 448 | %{__sed} -i s/^daemons=.*/"daemons=$daemons"/ /etc/authlib/authdaemonrc |
7c5b4b59 AA |
449 | fi |
450 | if [ -f /var/lock/subsys/courier-imap ]; then | |
ec099892 ER |
451 | if [ -f /var/lib/authdaemon/pid ]; then |
452 | kill `cat /var/lib/authdaemon/pid` | |
453 | rm -f /var/lib/authdaemon/* | |
24593e93 | 454 | /sbin/service courier-authlib start |
ec099892 | 455 | fi |
7c5b4b59 AA |
456 | fi |
457 | ||
458 | %triggerin -- sqwebmail < 5.0.0 | |
459 | if [ -f /etc/sqwebmail/authdaemonrc ]; then | |
ec099892 | 460 | . /etc/sqwebmail/authdaemonrc |
7c5b4b59 | 461 | |
eae3d21d | 462 | %{__sed} -i s/^authmodulelist=.*/"authmodulelist=\"`echo $authmodulelist \ |
ec099892 | 463 | | sed s/'authcram'/''/ | sed s/' '/' '/`\""/ /etc/authlib/authdaemonrc |
eae3d21d | 464 | %{__sed} -i s/^authmodulelistorig=.*/"authmodulelistorig=\"`echo $authmodulelistorig\ |
ec099892 | 465 | | sed s/'authcram'/''/ | sed s/' '/' '/`\""/ /etc/authlib/authdaemonrc |
eae3d21d | 466 | %{__sed} -i s/^daemons=.*/"daemons=$daemons"/ /etc/authlib/authdaemonrc |
7c5b4b59 AA |
467 | fi |
468 | if [ -f /var/lock/subsys/sqwebmail ]; then | |
ec099892 ER |
469 | if [ -f /var/spool/sqwebmail/authdaemon/pid ]; then |
470 | kill `cat /var/spool/sqwebmail/authdaemon/pid` | |
471 | rm -f /var/spool/sqwebmail/authdaemon/* | |
24593e93 | 472 | /sbin/service courier-authlib start |
ec099892 | 473 | fi |
7c5b4b59 AA |
474 | fi |
475 | ||
476 | %triggerin -n %{name}-authldap -- courier-authldap < 0.48 | |
477 | if [ -f /etc/courier/authldaprc ]; then | |
ec099892 ER |
478 | mv -f /etc/authlib/authldaprc /etc/authlib/authldaprc.new |
479 | cp -f /etc/courier/authldaprc /etc/authlib/authldaprc | |
24593e93 | 480 | %service -q courier-authlib restart |
7c5b4b59 AA |
481 | fi |
482 | ||
483 | %triggerin -n %{name}-authldap -- courier-imap-authldap < 4.0.0 | |
484 | if [ -f /etc/courier-imap/authldaprc ]; then | |
ec099892 ER |
485 | mv -f /etc/authlib/authldaprc /etc/authlib/authldaprc.new |
486 | cp -f /etc/courier-imap/authldaprc /etc/authlib/authldaprc | |
24593e93 | 487 | %service -q courier-authlib restart |
7c5b4b59 AA |
488 | fi |
489 | ||
490 | %triggerin -n %{name}-authldap -- sqwebmail-auth-ldap < 5.0.0 | |
491 | if [ -f /etc/sqwebmail/authldaprc ]; then | |
ec099892 ER |
492 | mv -f /etc/authlib/authldaprc /etc/authlib/authldaprc.new |
493 | cp -f /etc/sqwebmail/authldaprc /etc/authlib/authldaprc | |
24593e93 | 494 | %service -q courier-authlib restart |
7c5b4b59 AA |
495 | fi |
496 | ||
497 | %triggerin -n %{name}-authmysql -- courier-authmysql < 0.48 | |
498 | if [ -f /etc/courier/authmysqlrc ]; then | |
ec099892 ER |
499 | mv -f /etc/authlib/authmysqlrc /etc/authlib/authmysqlrc.new |
500 | cp -f /etc/courier/authmysqlrc /etc/authlib/authmysqlrc | |
24593e93 | 501 | %service -q courier-authlib restart |
7c5b4b59 AA |
502 | fi |
503 | ||
504 | %triggerin -n %{name}-authmysql -- courier-imap-authmysql < 4.0.0 | |
505 | if [ -f /etc/courier-imap/authmysqlrc ]; then | |
ec099892 ER |
506 | mv -f /etc/authlib/authmysqlrc /etc/authlib/authmysqlrc.new |
507 | cp -f /etc/courier-imap/authmysqlrc /etc/authlib/authmysqlrc | |
24593e93 | 508 | %service -q courier-authlib restart |
7c5b4b59 AA |
509 | fi |
510 | ||
511 | %triggerin -n %{name}-authmysql -- sqwebmail-auth-mysql < 5.0.0 | |
512 | if [ -f /etc/sqwebmail/authmysqlrc ]; then | |
ec099892 ER |
513 | mv -f /etc/authlib/authmysqlrc /etc/authlib/authmysqlrc.new |
514 | cp -f /etc/sqwebmail/authmysqlrc /etc/authlib/authmysqlrc | |
24593e93 | 515 | %service -q courier-authlib restart |
7c5b4b59 AA |
516 | fi |
517 | ||
518 | %triggerin -n %{name}-authpgsql -- courier-authpgsql < 0.48 | |
519 | if [ -f /etc/courier/authpgsqlrc ]; then | |
ec099892 ER |
520 | mv -f /etc/authlib/authpgsqlrc /etc/authlib/authpgsqlrc.new |
521 | cp -f /etc/courier/authpgsqlrc /etc/authlib/authpgsqlrc | |
24593e93 | 522 | %service -q courier-authlib restart |
7c5b4b59 AA |
523 | fi |
524 | ||
525 | %triggerin -n %{name}-authpgsql -- courier-imap-authpgsql < 4.0.0 | |
526 | if [ -f /etc/courier-imap/authpgsqlrc ]; then | |
ec099892 ER |
527 | mv -f /etc/authlib/authpgsqlrc /etc/authlib/authpgsqlrc.new |
528 | cp -f /etc/courier-imap/authpgsqlrc /etc/authlib/authpgsqlrc | |
24593e93 | 529 | %service -q courier-authlib restart |
7c5b4b59 AA |
530 | fi |
531 | ||
532 | %triggerin -n %{name}-authpgsql -- sqwebmail-auth-pgsql < 5.0.0 | |
533 | if [ -f /etc/sqwebmail/authpgsqlrc ]; then | |
ec099892 ER |
534 | mv -f /etc/authlib/authpgsqlrc /etc/authlib/authpgsqlrc.new |
535 | cp -f /etc/sqwebmail/authpgsqlrc /etc/authlib/authpgsqlrc | |
24593e93 | 536 | %service -q courier-authlib restart |
7c5b4b59 AA |
537 | fi |
538 | ||
a25e80b2 | 539 | %triggerin -n %{name}-authuserdb -- courier < 0.48 |
7c5b4b59 | 540 | if [ -d /etc/courier/userdb ]; then |
ec099892 ER |
541 | mv -f /etc/courier/userdb/* /etc/authlib/userdb |
542 | makeuserdb | |
7c5b4b59 AA |
543 | fi |
544 | if [ -f /etc/courier/userdb ]; then | |
ec099892 ER |
545 | mv -f /etc/courier/userdb /etc/authlib/userdb |
546 | makeuserdb | |
7c5b4b59 AA |
547 | fi |
548 | ||
a25e80b2 | 549 | %triggerin -n %{name}-authuserdb -- courier-imap-userdb < 4.0.0 |
7c5b4b59 | 550 | if [ -d /etc/courier-imap/userdb ]; then |
ec099892 ER |
551 | mv -f /etc/courier-imap/userdb/* /etc/authlib/userdb |
552 | makeuserdb | |
7c5b4b59 AA |
553 | fi |
554 | if [ -f /etc/courier-imap/userdb ]; then | |
ec099892 ER |
555 | mv -f /etc/courier-imap/userdb /etc/authlib/userdb |
556 | makeuserdb | |
7c5b4b59 AA |
557 | fi |
558 | ||
a25e80b2 | 559 | %triggerin -n %{name}-authuserdb -- sqwebmail-auth-userdb < 5.0.0 |
7c5b4b59 | 560 | if [ -d /etc/sqwebmail/userdb ]; then |
ec099892 ER |
561 | mv -f /etc/sqwebmail/userdb/* /etc/authlib/userdb |
562 | makeuserdb | |
7c5b4b59 AA |
563 | fi |
564 | if [ -f /etc/sqwebmail/userdb ]; then | |
ec099892 ER |
565 | mv -f /etc/sqwebmail/userdb /etc/authlib/userdb |
566 | makeuserdb | |
7c5b4b59 | 567 | fi |
d8024fa3 | 568 | |
8cd33d7f AA |
569 | %files |
570 | %defattr(644,root,root,755) | |
5b23ae53 JB |
571 | # COPYING contains only note |
572 | %doc AUTHORS COPYING ChangeLog NEWS README README*html README.authmysql.myownquery authldap.schema | |
eae3d21d | 573 | %attr(755,root,root) %{_bindir}/makedat |
8cd33d7f | 574 | %dir %{_sysconfdir}/authlib |
e19cf09a | 575 | %attr(754,root,root) /etc/rc.d/init.d/courier-authlib |
c6288251 | 576 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authdaemonrc |
8cd33d7f AA |
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 | |
a682a4df | 580 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthcustom.so |
5c08e216 | 581 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthcustom.so.0 |
a682a4df | 582 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthpam.so |
5c08e216 | 583 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthpam.so.0 |
a682a4df | 584 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauthcommon.so |
5c08e216 | 585 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libcourierauthcommon.so.0 |
a682a4df | 586 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauthsasl.so |
5c08e216 | 587 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libcourierauthsasl.so.0 |
a682a4df | 588 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauthsaslclient.so |
5c08e216 | 589 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libcourierauthsaslclient.so.0 |
d8024fa3 AA |
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 | |
8cd33d7f | 596 | %attr(770,root,daemon) %dir %{_localstatedir}/spool/authdaemon |
73c4092d | 597 | %attr(777,root,root) %ghost %{_localstatedir}/spool/authdaemon/socket |
8cd33d7f AA |
598 | %attr(755,root,root) %{_sbindir}/authdaemond |
599 | %attr(755,root,root) %{_sbindir}/authenumerate | |
fff07340 | 600 | %attr(755,root,root) %{_sbindir}/authpasswd |
8cd33d7f AA |
601 | %attr(755,root,root) %{_sbindir}/authtest |
602 | %attr(755,root,root) %{_sbindir}/courierlogger | |
f7916935 JB |
603 | %{_mandir}/man1/authpasswd.1* |
604 | %{_mandir}/man1/authtest.1* | |
605 | %{_mandir}/man1/courierlogger.1* | |
8cd33d7f | 606 | |
109ce427 ER |
607 | %files libs |
608 | %defattr(644,root,root,755) | |
609 | %dir %{_libexecdir}/courier-authlib | |
a682a4df | 610 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauth.so |
5c08e216 | 611 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libcourierauth.so.0 |
109ce427 | 612 | |
8cd33d7f AA |
613 | %files devel |
614 | %defattr(644,root,root,755) | |
615 | %doc authlib.html auth_*.html | |
616 | %attr(755,root,root) %{_bindir}/courierauthconfig | |
f7916935 JB |
617 | %{_includedir}/courier_auth_config.h |
618 | %{_includedir}/courierauth*.h | |
619 | %{_mandir}/man3/auth_*.3* | |
620 | %{_mandir}/man3/authlib.3* | |
8cd33d7f | 621 | |
905c8d0b | 622 | %if %{with ldap} |
8cd33d7f AA |
623 | %files authldap |
624 | %defattr(644,root,root,755) | |
625 | %doc authldap.schema README.ldap | |
c6288251 | 626 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authldaprc |
a682a4df | 627 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthldap.so |
5c08e216 | 628 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthldap.so.0 |
d8024fa3 | 629 | %{_libexecdir}/courier-authlib/libauthldap.la |
905c8d0b | 630 | %endif |
8cd33d7f AA |
631 | |
632 | %files authmysql | |
633 | %defattr(644,root,root,755) | |
c6288251 | 634 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authmysqlrc |
a682a4df | 635 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthmysql.so |
5c08e216 | 636 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthmysql.so.0 |
d8024fa3 | 637 | %{_libexecdir}/courier-authlib/libauthmysql.la |
8cd33d7f AA |
638 | |
639 | %files authpgsql | |
640 | %defattr(644,root,root,755) | |
c6288251 | 641 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authpgsqlrc |
a682a4df | 642 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthpgsql.so |
5c08e216 | 643 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthpgsql.so.0 |
d8024fa3 | 644 | %{_libexecdir}/courier-authlib/libauthpgsql.la |
8cd33d7f | 645 | |
b22413c1 MK |
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 | ||
a25e80b2 | 659 | %files authuserdb |
8cd33d7f | 660 | %defattr(644,root,root,755) |
7c5b4b59 | 661 | %attr(700,root,root) %dir %{_sysconfdir}/authlib/userdb |
8cd33d7f | 662 | %attr(755,root,root) %{_sbindir}/makeuserdb |
7c5b4b59 | 663 | %attr(755,root,root) %{_sbindir}/pw2userdb |
8cd33d7f | 664 | %attr(755,root,root) %{_sbindir}/userdb |
7c5b4b59 | 665 | %attr(755,root,root) %{_sbindir}/userdb-test-cram-md5 |
8cd33d7f | 666 | %attr(755,root,root) %{_sbindir}/userdbpw |
a682a4df | 667 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthuserdb.so |
5c08e216 | 668 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthuserdb.so.0 |
d8024fa3 | 669 | %{_libexecdir}/courier-authlib/libauthuserdb.la |
f7916935 JB |
670 | %{_mandir}/man8/makeuserdb.8* |
671 | %{_mandir}/man8/userdb.8* | |
672 | %{_mandir}/man8/userdbpw.8* | |
8d3b74ac | 673 | |
905c8d0b | 674 | %if %{with ldap} |
c259485d ER |
675 | %files -n openldap-schema-courier |
676 | %defattr(644,root,root,755) | |
f7916935 | 677 | %{schemadir}/courier.schema |
905c8d0b | 678 | %endif |