1 # $Id: courier-authlib.spec.in,v 1.14 2008/07/13 14:53:39 mrsam Exp $
3 # Copyright 1998 - 2008 Double Precision, Inc. See COPYING for
4 # distribution information.
6 # No dist tag from mock; detect mandrake, redhat, etc. the old fashioned way
8 %define courier_release %
(test -e
/etc
/mandrake
-release
-o
-e
/etc
/mandriva
-release
&& release
="mdk"
; if test $?
!= 0; then release
="`rpm
-q
--queryformat
='.rh
%{VERSION}' redhat-release 2>/dev/null`" ; if test $? != 0 ; then release="`rpm -q --queryformat='.fc%{VERSION}' fedora
-release
2>/dev
/null`"
; if test $?
!= 0 ; then release
=""
; fi ; fi ; fi ; echo "$release"
)
10 %define courier_release
%{nil}
13 ################################################################################
17 Release: 1%{?dist}%{?courier_release}
18 Summary: Courier authentication library
20 Group: System Environment
/Daemons
22 URL: http
://www.courier
-mta.org
24 ################################################################################
26 Source: http
://dl.sourceforge.net
/courier
/%{name}-%{version}.tar.bz2
28 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n
)
30 ################################################################################
32 BuildRequires
: libtool
33 BuildRequires
: openldap
-devel
34 BuildRequires
: mysql
-devel zlib
-devel
35 BuildRequires
: postgresql
-devel
36 BuildRequires
: gdbm
-devel
37 BuildRequires
: pam
-devel
39 BuildRequires
: gcc
-c
++
40 BuildRequires
: redhat
-rpm
-config
42 BuildRequires
: %{_includedir}/ltdl.h
44 %if 0%
(rpm
-q redhat
-release
>/dev
/null
2>&1 || rpm
-q fedora
-release
>/dev
/null
2>&1 ||
exit 0; echo "
1"
)
45 BuildRequires
: redhat
-rpm
-config
49 Requires(post
): /sbin
/chkconfig
50 Requires(preun
): /sbin
/chkconfig
52 # Provides by symlinks in this release, for compatibility with 0.60,
53 # will be removed in 0.62. This is temporary hack:
55 %define dummysuffix %
(test "
%{_lib}"
= "lib64"
&& echo '
()(64bit
)'
)
57 Provides: libcourierauth.so
.0%{dummysuffix} libcourierauthsasl.so.0%{dummysuffix} libcourierauthsaslclient.so.0%{dummysuffix} libcourierauthcommon.so.0%{dummysuffix}
59 ################################################################################
62 The Courier authentication library provides authentication services
for
63 other Courier applications.
65 ################################################################################
68 Summary: Development libraries
for the Courier authentication library
69 Group: Development
/Libraries
70 Requires: courier
-authlib
= 0:%{version}-%{release}
73 This package contains the development libraries and files needed to compile
74 Courier packages that use this authentication library. Install this
75 package
in order to build the rest of the Courier packages. After they are
76 built and installed this package can be removed. Files
in this package
77 are not needed at runtime.
79 ################################################################################
83 Summary: userdb support
for the Courier authentication library
84 Group: System Environment
/Daemons
85 Requires: courier
-authlib
= 0:%{version}-%{release}
88 This package installs the userdb support
for the Courier authentication
89 library. Userdb is a simple way to manage virtual mail accounts using
90 a GDBM
-based database file.
91 Install this package
in order to be able to authenticate with userdb.
93 ################################################################################
97 Summary: LDAP support
for the Courier authentication library
98 Group: System Environment
/Daemons
99 Requires: courier
-authlib
= 0:%{version}-%{release}
102 This package installs LDAP support
for the Courier authentication library.
103 Install this package
in order to be able to authenticate using LDAP.
105 ################################################################################
109 Summary: MySQL support
for the Courier authentication library
110 Group: System Environment
/Daemons
111 Requires: courier
-authlib
= 0:%{version}-%{release}
114 This package installs MySQL support
for the Courier authentication library.
115 Install this package
in order to be able to authenticate using MySQL.
117 ################################################################################
121 Summary: MySQL support
for the Courier authentication library
122 Group: System Environment
/Daemons
123 Requires: courier
-authlib
= 0:%{version}-%{release}
126 This package installs PostgreSQL support
for the Courier authentication
128 Install this package
in order to be able to authenticate using PostgreSQL.
130 ################################################################################
134 Summary: External authentication module that communicates via pipes
135 Group: System Environment
/Daemons
136 Requires: courier
-authlib
= 0:%{version}-%{release}
139 This package installs the authpipe module
, which is a generic plugin
140 that enables authentication requests to be serviced by an external
141 program
, then communicates through messages on stdin and stdout.
143 ################################################################################
147 %configure --with
-redhat
150 %{__make} -s %{_smp_mflags}
153 rm -rf $RPM_BUILD_ROOT
154 MAKEFLAGS
= %{__make} -j
1 install DESTDIR
=$RPM_BUILD_ROOT
155 %{__rm} -f $RPM_BUILD_ROOT%{_libdir}/courier
-authlib
/*.a
156 %{__install} -m 555 sysconftool $RPM_BUILD_ROOT%{_libexecdir}/courier
-authlib
157 %{__install} -m 555 authmigrate $RPM_BUILD_ROOT%{_libexecdir}/courier
-authlib
159 .
/courierauthconfig
--configfiles
>configtmp
162 .
/authmksock $RPM_BUILD_ROOT
%{_localstatedir}/spool
/authdaemon
/socket ||
exit 1
163 touch $RPM_BUILD_ROOT
%{_localstatedir}/spool
/authdaemon
/pid.lock ||
exit 1
164 touch $RPM_BUILD_ROOT
%{_localstatedir}/spool
/authdaemon
/pid ||
exit 1
165 %{__chmod} 777 $RPM_BUILD_ROOT%{_localstatedir}/spool
/authdaemon
/socket ||
exit 1
167 cat
>configfiles.base
<<EOF
168 %defattr(-,$mailuser
,$mailgroup
,-)
169 %{_sysconfdir}/authlib
170 %{_libexecdir}/courier
-authlib
171 %dir %{_libdir}/courier
-authlib
172 %dir %attr(750,$mailuser
,$mailgroup
) %{_localstatedir}/spool
/authdaemon
175 echo "
%defattr(-,$mailuser
,$mailgroup
,-)"
>configfiles.mysql
176 echo "
%defattr(-,$mailuser
,$mailgroup
,-)"
>configfiles.ldap
177 echo "
%defattr(-,$mailuser
,$mailgroup
,-)"
>configfiles.pgsql
178 echo "
%defattr(-,$mailuser
,$mailgroup
,-)"
>configfiles.userdb
179 echo "
%defattr(-,$mailuser
,$mailgroup
,-)"
>configfiles.pipe
180 echo "
%defattr(-,$mailuser
,$mailgroup
,-)"
>configfiles.devel
182 for f
in $RPM_BUILD_ROOT
%{_sbindir}/*
187 echo "
%{_sbindir}/$fn"
>>configfiles.userdb
190 echo "
%{_sbindir}/$fn"
>>configfiles.base
195 for f
in $RPM_BUILD_ROOT
%{_libdir}/courier
-authlib
/*
200 echo "
%{_libdir}/courier
-authlib
/$fn"
>>configfiles.pipe
203 echo "
%{_libdir}/courier
-authlib
/$fn"
>>configfiles.ldap
206 echo "
%{_libdir}/courier
-authlib
/$fn"
>>configfiles.mysql
209 echo "
%{_libdir}/courier
-authlib
/$fn"
>>configfiles.pgsql
212 echo "
%{_libdir}/courier
-authlib
/$fn"
>>configfiles.ldap
215 echo "
%{_libdir}/courier
-authlib
/$fn"
>>configfiles.userdb
218 echo "
%{_libdir}/courier
-authlib
/$fn"
>>configfiles.base
222 %{__mkdir_p} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d
/init.d
223 %{__install} -m
555 courier
-authlib.sysvinit \
224 $RPM_BUILD_ROOT
%{_sysconfdir}/rc.d
/init.d
/courier
-authlib
227 %{_libexecdir}/courier
-authlib
/authmigrate
>/dev
/null
228 %{_libexecdir}/courier-authlib/sysconftool %{_sysconfdir}/authlib
/*.dist
>/dev
/null
230 /sbin
/chkconfig
--del courier
-authlib
231 /sbin
/chkconfig
--add courier
-authlib
234 if test -x
%{_sbindir}/authdaemond
236 %{_sbindir}/authdaemond
>/dev
/null
2>&1 ||
/bin
/true
241 /sbin
/chkconfig
--del courier
-authlib
245 rm -rf $RPM_BUILD_ROOT
248 %files -f configfiles.base
249 %defattr(-,root
,root
,-)
250 %doc README README
*html README.authmysql.myownquery README.ldap
251 %doc NEWS COPYING
* AUTHORS ChangeLog authldap.schema
253 %ghost %attr(600, root
, root
) %{_localstatedir}/spool
/authdaemon
/pid.lock
254 %ghost %attr(644, root
, root
) %{_localstatedir}/spool
/authdaemon
/pid
255 %ghost %attr(-, root
, root
) %{_localstatedir}/spool
/authdaemon
/socket
258 %files -f configfiles.userdb userdb
259 %{_mandir}/man8
/*userdb
*
261 %files -f configfiles.devel devel
262 %defattr(-,root
,root
,-)
263 %{_bindir}/courierauthconfig
266 %doc authlib.html auth_
*.html
268 %files -f configfiles.ldap ldap
269 %defattr(-,root
,root
,-)
272 %files -f configfiles.mysql mysql
274 %files -f configfiles.pgsql pgsql
276 %files -f configfiles.pipe pipe
280 * Thu Sep
7 2006 Chris Petersen
<rpm@forevermore.net
> 0.58-2
281 - Make the spec a little prettier
282 - Replace BuildPreReq with BuildRequires
283 - Remove period from summaries
(rpmlint
)
284 - Fix release tag to use
%{?dist} macro
if it's present
285 - Change distro
-detection to use "rh" and "
fc"
for version detection
, and add support
for mandriva
287 * Sun Oct
3 2004 Mr. Sam
<sam@email
-scan.com
> 0.50-1