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