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