|
|
@@ -39,11 +39,18 @@ Release: 20030307
|
|
|
Source0: ftp://ftp.openldap.org/pub/openldap/openldap-release/openldap-%{version}.tgz
|
|
|
Source1: rc.openldap
|
|
|
|
|
|
+# package options
|
|
|
+%option with_sasl no
|
|
|
+
|
|
|
# build information
|
|
|
Prefix: %{l_prefix}
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
-BuildPreReq: OpenPKG, openpkg >= 20020206, sasl, openssl, db >= 4.1.24, make, gcc
|
|
|
-PreReq: OpenPKG, openpkg >= 20020206, sasl
|
|
|
+BuildPreReq: OpenPKG, openpkg >= 20020206, openssl, db >= 4.1.24, make, gcc
|
|
|
+PreReq: OpenPKG, openpkg >= 20020206
|
|
|
+%if "%{with_sasl}" == "yes"
|
|
|
+BuildPreReq: sasl
|
|
|
+PreReq: sasl
|
|
|
+%endif
|
|
|
AutoReq: no
|
|
|
AutoReqProv: no
|
|
|
|
|
|
@@ -58,9 +65,18 @@ AutoReqProv: no
|
|
|
%setup -q
|
|
|
|
|
|
%build
|
|
|
+%if "%{with_sasl}" == "yes"
|
|
|
+ # hard-code configure to use SASL2 library
|
|
|
+ %{l_shtool} subst \
|
|
|
+ -e '4s/.*/ac_cv_lib_sasl2_sasl_client_init=yes/' \
|
|
|
+ configure
|
|
|
+ cf="%{l_cppflags sasl}"
|
|
|
+%else
|
|
|
+ cf="%{l_cppflags}"
|
|
|
+%endif
|
|
|
CC="%{l_cc}" \
|
|
|
CFLAGS="%{l_cflags -O}" \
|
|
|
- CPPFLAGS="%{l_cppflags sasl}" \
|
|
|
+ CPPFLAGS="$cf" \
|
|
|
LDFLAGS="%{l_ldflags}" \
|
|
|
./configure \
|
|
|
--prefix=%{l_prefix} \
|
|
|
@@ -69,9 +85,15 @@ AutoReqProv: no
|
|
|
--with-ldbm-api=berkeley \
|
|
|
--with-ldbm-module=static \
|
|
|
--with-ldbm-type=btree \
|
|
|
- --enable-slurpd \
|
|
|
+%if "%{with_sasl}" == "yes"
|
|
|
+ --with-cyrus-sasl=%{l_prefix} \
|
|
|
+ --enable-spasswd \
|
|
|
+%else
|
|
|
--without-cyrus-sasl \
|
|
|
--disable-spasswd \
|
|
|
+%else
|
|
|
+%endif
|
|
|
+ --enable-slurpd \
|
|
|
--disable-shared
|
|
|
%{l_make} %{l_mflags}
|
|
|
|