|
|
@@ -24,6 +24,9 @@
|
|
|
##
|
|
|
|
|
|
# package options
|
|
|
+%ifndef with_fsl
|
|
|
+%define with_fsl no
|
|
|
+%endif
|
|
|
%ifndef with_pam
|
|
|
%define with_pam no
|
|
|
%endif
|
|
|
@@ -43,11 +46,16 @@ Release: 20020811
|
|
|
# list of sources
|
|
|
Source0: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-%{version}.tar.gz
|
|
|
Source1: rc.sasl
|
|
|
+Source2: fsl.sasl
|
|
|
|
|
|
# build information
|
|
|
Prefix: %{l_prefix}
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20020206, db, openssl
|
|
|
+%if "%{with_fsl}" == "yes"
|
|
|
+BuildPreReq: fsl
|
|
|
+PreReq: fsl
|
|
|
+%endif
|
|
|
PreReq: OpenPKG, openpkg >= 20020206
|
|
|
AutoReq: no
|
|
|
AutoReqProv: no
|
|
|
@@ -62,6 +70,7 @@ AutoReqProv: no
|
|
|
the connection.
|
|
|
|
|
|
Options:
|
|
|
+ --define 'with_fsl %{with_fsl}' \
|
|
|
--define 'with_pam %{with_pam}'
|
|
|
|
|
|
%prep
|
|
|
@@ -78,7 +87,13 @@ AutoReqProv: no
|
|
|
configure
|
|
|
CC="%{l_cc}" \
|
|
|
CFLAGS="%{l_cflags -O} -I%{l_prefix}/include" \
|
|
|
- LDFLAGS="-L%{l_prefix}/lib -ldb" \
|
|
|
+%if "%{with_fsl}" == "yes"
|
|
|
+ LDFLAGS="-L%{l_prefix}/lib `%{l_prefix}/bin/fsl-config --ldflags`" \
|
|
|
+ LIBS="-ldb `%{l_prefix}/bin/fsl-config --libs`" \
|
|
|
+%else
|
|
|
+ LDFLAGS="-L%{l_prefix}/lib" \
|
|
|
+ LIBS="-ldb" \
|
|
|
+%endif
|
|
|
./configure \
|
|
|
--prefix=%{l_prefix} \
|
|
|
--with-plugindir=%{l_prefix}/lib/sasl \
|
|
|
@@ -115,12 +130,26 @@ AutoReqProv: no
|
|
|
%endif
|
|
|
%{SOURCE rc.sasl} \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
+%if "%{with_fsl}" == "yes"
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
+ -e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
+ %{SOURCE fsl.sasl} \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
|
|
|
+%endif
|
|
|
+ %{l_shtool} mkdir -f -p -m 700 \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/var/sasl/log
|
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/var/sasl/saslauthd
|
|
|
mv $RPM_BUILD_ROOT%{l_prefix}/lib/sasl2 \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/lib/sasl
|
|
|
strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
|
|
|
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
|
|
|
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
|
|
|
+%if "%{with_fsl}" == "yes"
|
|
|
+ '%config %{l_prefix}/etc/fsl/fsl.sasl' \
|
|
|
+ '%not %dir %{l_prefix}/etc/fsl' \
|
|
|
+%endif
|
|
|
+ '%dir %attr(-,%{l_susr},%{l_sgrp}) %{l_prefix}/var/sasl/log'
|
|
|
|
|
|
%files -f files
|
|
|
|