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