]>
Commit | Line | Data |
---|---|---|
8cd33d7f | 1 | Summary: Courier authentication library |
868d4675 | 2 | Summary(pl.UTF-8): Biblioteka uwierzytelniania Couriera |
8cd33d7f | 3 | Name: courier-authlib |
76f2f607 | 4 | Version: 0.60.2 |
a9d3c71b | 5 | Release: 3 |
8cd33d7f AA |
6 | License: GPL |
7 | Group: Networking/Daemons | |
7c5b4b59 | 8 | Source0: http://dl.sourceforge.net/courier/%{name}-%{version}.tar.bz2 |
76f2f607 | 9 | # Source0-md5: dd972318b77efd0d04dbcb4a6b140bbe |
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 |
717eee5c | 24 | BuildRequires: openldap-devel >= 2.3.0 |
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} | |
eae3d21d ER |
225 | %{__automake} |
226 | cd - | |
227 | done | |
228 | ||
7c5b4b59 AA |
229 | %configure \ |
230 | --with-db=db \ | |
231 | --with-mailuser=daemon \ | |
232 | --with-mailgroup=daemon | |
8cd33d7f | 233 | |
7ffb40c2 | 234 | %{__make} \ |
235 | LDFLAGS="%{rpmldflags} -lcrypt" | |
8cd33d7f AA |
236 | |
237 | %install | |
238 | rm -rf $RPM_BUILD_ROOT | |
239 | ||
eae3d21d | 240 | %{__make} install \ |
8cd33d7f AA |
241 | DESTDIR=$RPM_BUILD_ROOT |
242 | ||
eae3d21d | 243 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_sysconfdir}/authlib/userdb,%{schemadir},%{_bindir}} |
8cd33d7f | 244 | |
aa89654a | 245 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/courier-authlib |
c259485d | 246 | install authldap.schema $RPM_BUILD_ROOT%{schemadir}/courier.schema |
eae3d21d | 247 | install makedat/makedat $RPM_BUILD_ROOT%{_bindir}/makedat |
8cd33d7f AA |
248 | |
249 | # make config files | |
250 | ./sysconftool $RPM_BUILD_ROOT%{_sysconfdir}/authlib/*.dist | |
251 | rm -f $RPM_BUILD_ROOT%{_sysconfdir}/authlib/*.dist | |
252 | ||
73c4092d ER |
253 | touch $RPM_BUILD_ROOT%{_localstatedir}/spool/authdaemon/socket |
254 | ||
8cd33d7f | 255 | # remove static library - for now |
eae3d21d | 256 | rm $RPM_BUILD_ROOT%{_libdir}/courier-authlib/*.a |
8cd33d7f | 257 | |
5626c9aa JB |
258 | %clean |
259 | rm -rf $RPM_BUILD_ROOT | |
260 | ||
8cd33d7f | 261 | %post |
7c5b4b59 | 262 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
8cd33d7f AA |
263 | /sbin/chkconfig --add courier-authlib |
264 | ||
24593e93 | 265 | %service courier-authlib restart "authlib daemon" |
8cd33d7f | 266 | |
7c5b4b59 | 267 | %preun |
5626c9aa | 268 | if [ "$1" = "0" ]; then |
8cd33d7f | 269 | /sbin/chkconfig --del courier-authlib |
24593e93 | 270 | %service courier-authlib stop |
7c5b4b59 AA |
271 | fi |
272 | ||
273 | %postun | |
274 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
275 | ||
109ce427 ER |
276 | %post libs |
277 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
278 | ||
279 | %postun libs | |
280 | /sbin/ldconfig %{_libexecdir}/courier-authlib | |
281 | ||
7c5b4b59 | 282 | %post authldap |
99b3aadf ER |
283 | if [ "$1" = 1 ]; then |
284 | # add to authmodulelist list if package is first installed | |
eae3d21d | 285 | %{__sed} -i -e '/^authmodulelist=/{/\bauthldap\b/!s/"$/ authldap"/}' /etc/authlib/authdaemonrc |
99b3aadf | 286 | fi |
7c5b4b59 | 287 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 288 | %service -q courier-authlib restart |
7c5b4b59 AA |
289 | |
290 | %postun authldap | |
99b3aadf ER |
291 | if [ "$1" = 0 ]; then |
292 | # remove from authmodulelist if package is removed | |
eae3d21d | 293 | %{__sed} -i -e '/^authmodulelist=/{s/ \?\bauthldap\b \?//}' /etc/authlib/authdaemonrc |
99b3aadf | 294 | fi |
7c5b4b59 | 295 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 296 | %service -q courier-authlib restart |
7c5b4b59 AA |
297 | |
298 | %post authmysql | |
99b3aadf ER |
299 | if [ "$1" = 1 ]; then |
300 | # add to authmodulelist list if package is first installed | |
eae3d21d | 301 | %{__sed} -i -e '/^authmodulelist=/{/\bauthmysql\b/!s/"$/ authmysql"/}' /etc/authlib/authdaemonrc |
99b3aadf | 302 | fi |
7c5b4b59 | 303 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 304 | %service -q courier-authlib restart |
7c5b4b59 AA |
305 | |
306 | %postun authmysql | |
99b3aadf ER |
307 | if [ "$1" = 0 ]; then |
308 | # remove from authmodulelist if package is removed | |
eae3d21d | 309 | %{__sed} -i -e '/^authmodulelist=/{s/ \?\bauthmysql\b \?//}' /etc/authlib/authdaemonrc |
99b3aadf | 310 | fi |
7c5b4b59 | 311 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 312 | %service -q courier-authlib restart |
7c5b4b59 AA |
313 | |
314 | %post authpgsql | |
99b3aadf ER |
315 | if [ "$1" = 1 ]; then |
316 | # add to authmodulelist list if package is first installed | |
eae3d21d | 317 | %{__sed} -i -e '/^authmodulelist=/{/\bauthpgsql\b/!s/"$/ authpgsql"/}' /etc/authlib/authdaemonrc |
99b3aadf | 318 | fi |
7c5b4b59 | 319 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 320 | %service -q courier-authlib restart |
7c5b4b59 AA |
321 | |
322 | %postun authpgsql | |
99b3aadf ER |
323 | if [ "$1" = 0 ]; then |
324 | # remove from authmodulelist if package is removed | |
eae3d21d | 325 | %{__sed} -i -e '/^authmodulelist=/{s/ \?\bauthpgsql\b \?//}' /etc/authlib/authdaemonrc |
99b3aadf | 326 | fi |
7c5b4b59 | 327 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 328 | %service -q courier-authlib restart |
7c5b4b59 | 329 | |
a25e80b2 | 330 | %post authuserdb |
99b3aadf ER |
331 | if [ "$1" = 1 ]; then |
332 | # add to authmodulelist list if package is first installed | |
eae3d21d | 333 | %{__sed} -i -e '/^authmodulelist=/{/\buserdb\b/!s/"$/ userdb"/}' /etc/authlib/authdaemonrc |
99b3aadf | 334 | fi |
7c5b4b59 | 335 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 336 | %service -q courier-authlib restart |
7c5b4b59 | 337 | |
a25e80b2 | 338 | %postun authuserdb |
99b3aadf ER |
339 | if [ "$1" = 0 ]; then |
340 | # remove from authmodulelist if package is removed | |
eae3d21d | 341 | %{__sed} -i -e '/^authmodulelist=/{s/ \?\buserdb\b \?//}' /etc/authlib/authdaemonrc |
99b3aadf | 342 | fi |
7c5b4b59 | 343 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 344 | %service -q courier-authlib restart |
7c5b4b59 | 345 | |
a25e80b2 | 346 | %post authpipe |
99b3aadf ER |
347 | if [ "$1" = 1 ]; then |
348 | # add to authmodulelist list if package is first installed | |
eae3d21d | 349 | %{__sed} -i -e '/^authmodulelist=/{/\bpipe\b/!s/"$/ pipe"/}' /etc/authlib/authdaemonrc |
99b3aadf | 350 | fi |
8d3b74ac | 351 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 352 | %service -q courier-authlib restart |
8d3b74ac | 353 | |
a25e80b2 | 354 | %postun authpipe |
99b3aadf ER |
355 | if [ "$1" = 0 ]; then |
356 | # remove from authmodulelist if package is removed | |
eae3d21d | 357 | %{__sed} -i -e '/^authmodulelist=/{s/ \?\bpipe\b \?//}' /etc/authlib/authdaemonrc |
99b3aadf | 358 | fi |
8d3b74ac | 359 | /sbin/ldconfig %{_libexecdir}/courier-authlib |
24593e93 | 360 | %service -q courier-authlib restart |
8d3b74ac | 361 | |
c259485d | 362 | %post -n openldap-schema-courier |
259e6fd9 | 363 | %openldap_schema_register %{schemadir}/courier.schema -d nis,cosine |
24593e93 | 364 | %service -q ldap restart |
c259485d ER |
365 | |
366 | %postun -n openldap-schema-courier | |
367 | if [ "$1" = "0" ]; then | |
259e6fd9 | 368 | %openldap_schema_unregister %{schemadir}/courier.schema |
24593e93 | 369 | %service -q ldap restart |
c259485d ER |
370 | fi |
371 | ||
7c5b4b59 AA |
372 | %triggerin -- courier < 0.48 |
373 | if [ -f /etc/courier/authdaemonrc ]; then | |
ec099892 | 374 | . /etc/courier/authdaemonrc |
7c5b4b59 | 375 | |
eae3d21d | 376 | %{__sed} -i s/^authmodulelist=.*/"authmodulelist=\"`echo $authmodulelist \ |
ec099892 | 377 | | sed s/'authcram'/''/ | sed s/' '/' '/`\""/ /etc/authlib/authdaemonrc |
eae3d21d | 378 | %{__sed} -i s/^authmodulelistorig=.*/"authmodulelistorig=\"`echo $authmodulelistorig\ |
ec099892 | 379 | | sed s/'authcram'/''/ | sed s/' '/' '/`\""/ /etc/authlib/authdaemonrc |
eae3d21d | 380 | %{__sed} -i s/^daemons=.*/"daemons=$daemons"/ /etc/authlib/authdaemonrc |
7c5b4b59 AA |
381 | fi |
382 | if [ -f /var/lock/subsys/courier ]; then | |
ec099892 ER |
383 | if [ -f /var/spool/courier/authdaemon/pid ]; then |
384 | kill `cat /var/spool/courier/authdaemon/pid` | |
385 | rm -f /var/spool/courier/authdaemon/* | |
24593e93 | 386 | /sbin/service courier-authlib start |
ec099892 | 387 | fi |
7c5b4b59 AA |
388 | fi |
389 | ||
390 | %triggerin -- courier-imap-common < 4.0.0 | |
391 | if [ -f /etc/courier-imap/authdaemonrc ]; then | |
ec099892 | 392 | . /etc/courier-imap/authdaemonrc |
7c5b4b59 | 393 | |
eae3d21d | 394 | %{__sed} -i s/^authmodulelist=.*/"authmodulelist=\"`echo $authmodulelist \ |
ec099892 | 395 | | sed s/'authcram'/''/ | sed s/' '/' '/`\""/ /etc/authlib/authdaemonrc |
eae3d21d | 396 | %{__sed} -i s/^authmodulelistorig=.*/"authmodulelistorig=\"`echo $authmodulelistorig\ |
ec099892 | 397 | | sed s/'authcram'/''/ | sed s/' '/' '/`\""/ /etc/authlib/authdaemonrc |
eae3d21d | 398 | %{__sed} -i s/^daemons=.*/"daemons=$daemons"/ /etc/authlib/authdaemonrc |
7c5b4b59 AA |
399 | fi |
400 | if [ -f /var/lock/subsys/courier-imap ]; then | |
ec099892 ER |
401 | if [ -f /var/lib/authdaemon/pid ]; then |
402 | kill `cat /var/lib/authdaemon/pid` | |
403 | rm -f /var/lib/authdaemon/* | |
24593e93 | 404 | /sbin/service courier-authlib start |
ec099892 | 405 | fi |
7c5b4b59 AA |
406 | fi |
407 | ||
408 | %triggerin -- sqwebmail < 5.0.0 | |
409 | if [ -f /etc/sqwebmail/authdaemonrc ]; then | |
ec099892 | 410 | . /etc/sqwebmail/authdaemonrc |
7c5b4b59 | 411 | |
eae3d21d | 412 | %{__sed} -i s/^authmodulelist=.*/"authmodulelist=\"`echo $authmodulelist \ |
ec099892 | 413 | | sed s/'authcram'/''/ | sed s/' '/' '/`\""/ /etc/authlib/authdaemonrc |
eae3d21d | 414 | %{__sed} -i s/^authmodulelistorig=.*/"authmodulelistorig=\"`echo $authmodulelistorig\ |
ec099892 | 415 | | sed s/'authcram'/''/ | sed s/' '/' '/`\""/ /etc/authlib/authdaemonrc |
eae3d21d | 416 | %{__sed} -i s/^daemons=.*/"daemons=$daemons"/ /etc/authlib/authdaemonrc |
7c5b4b59 AA |
417 | fi |
418 | if [ -f /var/lock/subsys/sqwebmail ]; then | |
ec099892 ER |
419 | if [ -f /var/spool/sqwebmail/authdaemon/pid ]; then |
420 | kill `cat /var/spool/sqwebmail/authdaemon/pid` | |
421 | rm -f /var/spool/sqwebmail/authdaemon/* | |
24593e93 | 422 | /sbin/service courier-authlib start |
ec099892 | 423 | fi |
7c5b4b59 AA |
424 | fi |
425 | ||
426 | %triggerin -n %{name}-authldap -- courier-authldap < 0.48 | |
427 | if [ -f /etc/courier/authldaprc ]; then | |
ec099892 ER |
428 | mv -f /etc/authlib/authldaprc /etc/authlib/authldaprc.new |
429 | cp -f /etc/courier/authldaprc /etc/authlib/authldaprc | |
24593e93 | 430 | %service -q courier-authlib restart |
7c5b4b59 AA |
431 | fi |
432 | ||
433 | %triggerin -n %{name}-authldap -- courier-imap-authldap < 4.0.0 | |
434 | if [ -f /etc/courier-imap/authldaprc ]; then | |
ec099892 ER |
435 | mv -f /etc/authlib/authldaprc /etc/authlib/authldaprc.new |
436 | cp -f /etc/courier-imap/authldaprc /etc/authlib/authldaprc | |
24593e93 | 437 | %service -q courier-authlib restart |
7c5b4b59 AA |
438 | fi |
439 | ||
440 | %triggerin -n %{name}-authldap -- sqwebmail-auth-ldap < 5.0.0 | |
441 | if [ -f /etc/sqwebmail/authldaprc ]; then | |
ec099892 ER |
442 | mv -f /etc/authlib/authldaprc /etc/authlib/authldaprc.new |
443 | cp -f /etc/sqwebmail/authldaprc /etc/authlib/authldaprc | |
24593e93 | 444 | %service -q courier-authlib restart |
7c5b4b59 AA |
445 | fi |
446 | ||
447 | %triggerin -n %{name}-authmysql -- courier-authmysql < 0.48 | |
448 | if [ -f /etc/courier/authmysqlrc ]; then | |
ec099892 ER |
449 | mv -f /etc/authlib/authmysqlrc /etc/authlib/authmysqlrc.new |
450 | cp -f /etc/courier/authmysqlrc /etc/authlib/authmysqlrc | |
24593e93 | 451 | %service -q courier-authlib restart |
7c5b4b59 AA |
452 | fi |
453 | ||
454 | %triggerin -n %{name}-authmysql -- courier-imap-authmysql < 4.0.0 | |
455 | if [ -f /etc/courier-imap/authmysqlrc ]; then | |
ec099892 ER |
456 | mv -f /etc/authlib/authmysqlrc /etc/authlib/authmysqlrc.new |
457 | cp -f /etc/courier-imap/authmysqlrc /etc/authlib/authmysqlrc | |
24593e93 | 458 | %service -q courier-authlib restart |
7c5b4b59 AA |
459 | fi |
460 | ||
461 | %triggerin -n %{name}-authmysql -- sqwebmail-auth-mysql < 5.0.0 | |
462 | if [ -f /etc/sqwebmail/authmysqlrc ]; then | |
ec099892 ER |
463 | mv -f /etc/authlib/authmysqlrc /etc/authlib/authmysqlrc.new |
464 | cp -f /etc/sqwebmail/authmysqlrc /etc/authlib/authmysqlrc | |
24593e93 | 465 | %service -q courier-authlib restart |
7c5b4b59 AA |
466 | fi |
467 | ||
468 | %triggerin -n %{name}-authpgsql -- courier-authpgsql < 0.48 | |
469 | if [ -f /etc/courier/authpgsqlrc ]; then | |
ec099892 ER |
470 | mv -f /etc/authlib/authpgsqlrc /etc/authlib/authpgsqlrc.new |
471 | cp -f /etc/courier/authpgsqlrc /etc/authlib/authpgsqlrc | |
24593e93 | 472 | %service -q courier-authlib restart |
7c5b4b59 AA |
473 | fi |
474 | ||
475 | %triggerin -n %{name}-authpgsql -- courier-imap-authpgsql < 4.0.0 | |
476 | if [ -f /etc/courier-imap/authpgsqlrc ]; then | |
ec099892 ER |
477 | mv -f /etc/authlib/authpgsqlrc /etc/authlib/authpgsqlrc.new |
478 | cp -f /etc/courier-imap/authpgsqlrc /etc/authlib/authpgsqlrc | |
24593e93 | 479 | %service -q courier-authlib restart |
7c5b4b59 AA |
480 | fi |
481 | ||
482 | %triggerin -n %{name}-authpgsql -- sqwebmail-auth-pgsql < 5.0.0 | |
483 | if [ -f /etc/sqwebmail/authpgsqlrc ]; then | |
ec099892 ER |
484 | mv -f /etc/authlib/authpgsqlrc /etc/authlib/authpgsqlrc.new |
485 | cp -f /etc/sqwebmail/authpgsqlrc /etc/authlib/authpgsqlrc | |
24593e93 | 486 | %service -q courier-authlib restart |
7c5b4b59 AA |
487 | fi |
488 | ||
a25e80b2 | 489 | %triggerin -n %{name}-authuserdb -- courier < 0.48 |
7c5b4b59 | 490 | if [ -d /etc/courier/userdb ]; then |
ec099892 ER |
491 | mv -f /etc/courier/userdb/* /etc/authlib/userdb |
492 | makeuserdb | |
7c5b4b59 AA |
493 | fi |
494 | if [ -f /etc/courier/userdb ]; then | |
ec099892 ER |
495 | mv -f /etc/courier/userdb /etc/authlib/userdb |
496 | makeuserdb | |
7c5b4b59 AA |
497 | fi |
498 | ||
a25e80b2 | 499 | %triggerin -n %{name}-authuserdb -- courier-imap-userdb < 4.0.0 |
7c5b4b59 | 500 | if [ -d /etc/courier-imap/userdb ]; then |
ec099892 ER |
501 | mv -f /etc/courier-imap/userdb/* /etc/authlib/userdb |
502 | makeuserdb | |
7c5b4b59 AA |
503 | fi |
504 | if [ -f /etc/courier-imap/userdb ]; then | |
ec099892 ER |
505 | mv -f /etc/courier-imap/userdb /etc/authlib/userdb |
506 | makeuserdb | |
7c5b4b59 AA |
507 | fi |
508 | ||
a25e80b2 | 509 | %triggerin -n %{name}-authuserdb -- sqwebmail-auth-userdb < 5.0.0 |
7c5b4b59 | 510 | if [ -d /etc/sqwebmail/userdb ]; then |
ec099892 ER |
511 | mv -f /etc/sqwebmail/userdb/* /etc/authlib/userdb |
512 | makeuserdb | |
7c5b4b59 AA |
513 | fi |
514 | if [ -f /etc/sqwebmail/userdb ]; then | |
ec099892 ER |
515 | mv -f /etc/sqwebmail/userdb /etc/authlib/userdb |
516 | makeuserdb | |
7c5b4b59 | 517 | fi |
d8024fa3 | 518 | |
8cd33d7f AA |
519 | %files |
520 | %defattr(644,root,root,755) | |
5b23ae53 JB |
521 | # COPYING contains only note |
522 | %doc AUTHORS COPYING ChangeLog NEWS README README*html README.authmysql.myownquery authldap.schema | |
eae3d21d | 523 | %attr(755,root,root) %{_bindir}/makedat |
8cd33d7f | 524 | %dir %{_sysconfdir}/authlib |
e19cf09a | 525 | %attr(754,root,root) /etc/rc.d/init.d/courier-authlib |
c6288251 | 526 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authdaemonrc |
8cd33d7f AA |
527 | %attr(755,root,root) %{_libexecdir}/courier-authlib/authdaemond |
528 | %attr(755,root,root) %{_libexecdir}/courier-authlib/authsystem.passwd | |
529 | %attr(755,root,root) %{_libexecdir}/courier-authlib/makedatprog | |
d8024fa3 | 530 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthcustom.so.*.*.* |
5c08e216 | 531 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthcustom.so.0 |
d8024fa3 | 532 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthpam.so.*.*.* |
5c08e216 | 533 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthpam.so.0 |
d8024fa3 | 534 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauthcommon.so.*.*.* |
5c08e216 | 535 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libcourierauthcommon.so.0 |
d8024fa3 | 536 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauthsasl.so.*.*.* |
5c08e216 | 537 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libcourierauthsasl.so.0 |
d8024fa3 | 538 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauthsaslclient.so.*.*.* |
5c08e216 | 539 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libcourierauthsaslclient.so.0 |
d8024fa3 AA |
540 | %{_libexecdir}/courier-authlib/libauthcustom.la |
541 | %{_libexecdir}/courier-authlib/libauthpam.la | |
542 | %{_libexecdir}/courier-authlib/libcourierauth.la | |
543 | %{_libexecdir}/courier-authlib/libcourierauthcommon.la | |
544 | %{_libexecdir}/courier-authlib/libcourierauthsasl.la | |
545 | %{_libexecdir}/courier-authlib/libcourierauthsaslclient.la | |
8cd33d7f | 546 | %attr(770,root,daemon) %dir %{_localstatedir}/spool/authdaemon |
73c4092d | 547 | %attr(777,root,root) %ghost %{_localstatedir}/spool/authdaemon/socket |
8cd33d7f AA |
548 | %attr(755,root,root) %{_sbindir}/authdaemond |
549 | %attr(755,root,root) %{_sbindir}/authenumerate | |
fff07340 | 550 | %attr(755,root,root) %{_sbindir}/authpasswd |
8cd33d7f AA |
551 | %attr(755,root,root) %{_sbindir}/authtest |
552 | %attr(755,root,root) %{_sbindir}/courierlogger | |
553 | %{_mandir}/man1/* | |
554 | ||
109ce427 ER |
555 | %files libs |
556 | %defattr(644,root,root,755) | |
557 | %dir %{_libexecdir}/courier-authlib | |
558 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libcourierauth.so.*.*.* | |
5c08e216 | 559 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libcourierauth.so.0 |
109ce427 | 560 | |
8cd33d7f AA |
561 | %files devel |
562 | %defattr(644,root,root,755) | |
563 | %doc authlib.html auth_*.html | |
564 | %attr(755,root,root) %{_bindir}/courierauthconfig | |
565 | %{_includedir}/* | |
566 | %{_mandir}/man3/* | |
d24cdae7 | 567 | %attr(755,root,root) %{_libexecdir}/courier-authlib/*.so |
8cd33d7f AA |
568 | |
569 | %files authldap | |
570 | %defattr(644,root,root,755) | |
571 | %doc authldap.schema README.ldap | |
c6288251 | 572 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authldaprc |
d8024fa3 | 573 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthldap.so.*.*.* |
5c08e216 | 574 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthldap.so.0 |
d8024fa3 | 575 | %{_libexecdir}/courier-authlib/libauthldap.la |
8cd33d7f AA |
576 | |
577 | %files authmysql | |
578 | %defattr(644,root,root,755) | |
c6288251 | 579 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authmysqlrc |
d8024fa3 | 580 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthmysql.so.*.*.* |
5c08e216 | 581 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthmysql.so.0 |
d8024fa3 | 582 | %{_libexecdir}/courier-authlib/libauthmysql.la |
8cd33d7f AA |
583 | |
584 | %files authpgsql | |
585 | %defattr(644,root,root,755) | |
c6288251 | 586 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/authlib/authpgsqlrc |
d8024fa3 | 587 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthpgsql.so.*.*.* |
5c08e216 | 588 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthpgsql.so.0 |
d8024fa3 | 589 | %{_libexecdir}/courier-authlib/libauthpgsql.la |
8cd33d7f | 590 | |
a25e80b2 | 591 | %files authuserdb |
8cd33d7f | 592 | %defattr(644,root,root,755) |
7c5b4b59 | 593 | %attr(700,root,root) %dir %{_sysconfdir}/authlib/userdb |
8cd33d7f | 594 | %attr(755,root,root) %{_sbindir}/makeuserdb |
7c5b4b59 | 595 | %attr(755,root,root) %{_sbindir}/pw2userdb |
8cd33d7f | 596 | %attr(755,root,root) %{_sbindir}/userdb |
7c5b4b59 | 597 | %attr(755,root,root) %{_sbindir}/userdb-test-cram-md5 |
8cd33d7f AA |
598 | %attr(755,root,root) %{_sbindir}/userdbpw |
599 | %attr(755,root,root) %{_sbindir}/vchkpw2userdb | |
d8024fa3 | 600 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthuserdb.so.*.*.* |
5c08e216 | 601 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthuserdb.so.0 |
d8024fa3 | 602 | %{_libexecdir}/courier-authlib/libauthuserdb.la |
8cd33d7f | 603 | %{_mandir}/man8/*userdb* |
8d3b74ac | 604 | |
a25e80b2 | 605 | %files authpipe |
8d3b74ac AA |
606 | %defattr(644,root,root,755) |
607 | %attr(755,root,root) %{_libexecdir}/courier-authlib/libauthpipe.so.*.*.* | |
5c08e216 | 608 | %attr(755,root,root) %ghost %{_libexecdir}/courier-authlib/libauthpipe.so.0 |
8d3b74ac | 609 | %{_libexecdir}/courier-authlib/libauthpipe.la |
c259485d ER |
610 | |
611 | %files -n openldap-schema-courier | |
612 | %defattr(644,root,root,755) | |
613 | %{schemadir}/*.schema |