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