|
|
@@ -25,7 +25,7 @@
|
|
|
|
|
|
# package information
|
|
|
Name: sasl
|
|
|
-Summary: Simple Authentication and Security Layer
|
|
|
+Summary: Simple Authentication and Security Layer (SASL)
|
|
|
URL: http://asg.web.cmu.edu/sasl/
|
|
|
Vendor: Cyrus Project, CMU
|
|
|
Packager: The OpenPKG Project
|
|
|
@@ -82,17 +82,18 @@ AutoReqProv: no
|
|
|
|
|
|
%prep
|
|
|
%setup -q -n cyrus-sasl-%{version}
|
|
|
- %{l_shtool} subst \
|
|
|
- -e 's;^ *for dbname in ;for dbname in db ;' \
|
|
|
- configure
|
|
|
%patch -p0
|
|
|
|
|
|
%build
|
|
|
+ # disable some unwanted configure checks
|
|
|
%{l_shtool} subst \
|
|
|
+ -e 's;^ *for dbname in ;for dbname in db ;' \
|
|
|
-e "s;javac;javac-xxx;g" \
|
|
|
-e "s;javah;javah-xxx;g" \
|
|
|
-e "s;javadoc;javadoc-xxx;g" \
|
|
|
configure
|
|
|
+
|
|
|
+ # fix OpenLDAP support
|
|
|
%if "%{with_ldap}" == "yes"
|
|
|
echo 'ac_cv_lib_ldap_ldap_initialize=yes' >config.cache
|
|
|
%{l_shtool} subst \
|
|
|
@@ -100,6 +101,7 @@ AutoReqProv: no
|
|
|
saslauthd/configure
|
|
|
%endif
|
|
|
|
|
|
+ # determine build flags
|
|
|
cflags="%{l_cflags -O} %{l_cppflags}"
|
|
|
ldflags="%{l_ldflags}"
|
|
|
libs="-ldb"
|
|
|
@@ -109,12 +111,12 @@ AutoReqProv: no
|
|
|
%endif
|
|
|
%if "%{with_ldap}" == "yes"
|
|
|
cflags="$cflags -DAUTH_LDAP"
|
|
|
- ldflags="$ldflags `%{l_prefix}/bin/fsl-config --all --ldflags`"
|
|
|
- libs="$libs `%{l_prefix}/bin/fsl-config --all --libs`"
|
|
|
%endif
|
|
|
%if "%{with_mysql}" == "yes"
|
|
|
libs="$libs -lz -lm"
|
|
|
%endif
|
|
|
+
|
|
|
+ # configure package
|
|
|
CC="%{l_cc}" \
|
|
|
CFLAGS="$cflags" \
|
|
|
CPPFLAGS="%{l_cppflags}" \
|
|
|
@@ -161,29 +163,32 @@ AutoReqProv: no
|
|
|
--without-des \
|
|
|
--without-opie
|
|
|
|
|
|
- # trust me, libtool, I know what I am doing
|
|
|
+ # post adjustment: trust me, libtool, I know what I am doing
|
|
|
%{l_shtool} subst \
|
|
|
-e 's;^\(deplibs_check_method=\).*;\1"pass_all";' \
|
|
|
libtool
|
|
|
- # do not reference static plugins
|
|
|
+ # post adjustment: do not reference static plugins
|
|
|
%{l_shtool} subst \
|
|
|
-e '58s;.*;#define PIC;' \
|
|
|
lib/dlopen.c
|
|
|
- # do not pull static plugins into static library
|
|
|
+ # post adjustment: do not pull static plugins into static library
|
|
|
%{l_shtool} subst \
|
|
|
-e '/^SASL_STATIC_OBJS/s;\.\./plugins/[^ ]* *;;g' \
|
|
|
lib/Makefile
|
|
|
- # build utils against static library
|
|
|
+ # post adjustment: build utils against static library
|
|
|
%{l_shtool} subst \
|
|
|
-e 's;\(\$(CCLD)\);\1 -static;' \
|
|
|
utils/Makefile
|
|
|
|
|
|
+ # build package
|
|
|
%{l_make} %{l_mflags}
|
|
|
cd saslauthd
|
|
|
%{l_make} %{l_mflags} testsaslauthd
|
|
|
|
|
|
%install
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
+
|
|
|
+ # install package
|
|
|
%{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
|
|
|
|
|
|
# remove libtool cruft
|
|
|
@@ -194,60 +199,71 @@ AutoReqProv: no
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/lib/sasl2/*.la \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/lib/sasl2/*.a
|
|
|
|
|
|
+ # post-adjust installation
|
|
|
+ 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
|
|
|
+
|
|
|
+ # install saslauthd test program
|
|
|
%{l_shtool} mkdir -f -p -m 755 \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/sbin \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/etc/sasl \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
|
|
|
- %{l_shtool} install -c -m 644 \
|
|
|
- utils/saslpasswd2.8 \
|
|
|
- utils/sasldblistusers2.8 \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/man/man8/
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/sbin
|
|
|
%{l_shtool} install -c -m 755 \
|
|
|
saslauthd/testsaslauthd \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/sbin/
|
|
|
+
|
|
|
+ # install saslauthd default configuration
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/sasl
|
|
|
%{l_shtool} install -c -m 755 \
|
|
|
%{SOURCE saslauthd.conf} \
|
|
|
$RPM_BUILD_ROOT%{l_prefix}/etc/sasl/
|
|
|
- %{l_shtool} install -c -m 755 \
|
|
|
- -e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
- -e 's;@l_susr@;%{l_susr};g' \
|
|
|
- %{SOURCE rc.sasl} \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
+
|
|
|
+ # install missing manual pages
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/man/man8
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
+ utils/saslpasswd2.8 \
|
|
|
+ utils/sasldblistusers2.8 \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/man/man8/
|
|
|
+
|
|
|
+ # create necessary additional directories
|
|
|
+ %{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/
|
|
|
+
|
|
|
+ # install run-command script
|
|
|
%if "%{with_pam}" == "yes"
|
|
|
- %{l_shtool} subst -e 's;@authmech@;pam;g' \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/rc.sasl
|
|
|
+ l_authmech="pam"
|
|
|
%else
|
|
|
case "%{l_target}" in
|
|
|
- ix86-linux* )
|
|
|
- %{l_shtool} subst -e 's;@authmech@;shadow;g' \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/rc.sasl
|
|
|
- ;;
|
|
|
- *-solaris* )
|
|
|
- %{l_shtool} subst -e 's;@authmech@;shadow;g' \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/rc.sasl
|
|
|
- ;;
|
|
|
- * )
|
|
|
- %{l_shtool} subst -e 's;@authmech@;getpwent;g' \
|
|
|
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/rc.sasl
|
|
|
- ;;
|
|
|
+ ix86-linux* ) l_authmech="shadow" ;;
|
|
|
+ *-solaris* ) l_authmech="shadow" ;;
|
|
|
+ * ) l_authmech="getpwent" ;;
|
|
|
esac
|
|
|
%endif
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
|
|
|
+ %{l_shtool} install -c -m 755 \
|
|
|
+ -e 's;@l_authmech@;${l_authmech};g' \
|
|
|
+ -e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
+ -e 's;@l_susr@;%{l_susr};g' \
|
|
|
+ %{SOURCE rc.sasl} \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
+
|
|
|
+ # install OSSP fsl configuration
|
|
|
%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} \
|
|
|
+ $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
|
|
|
+
|
|
|
+ # determine installation files
|
|
|
+ %{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' \
|