File cyrus-sasl-saslauthd.spec of Package cyrus-sasl

# spec file for package cyrus-sasl-saslauthd
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           cyrus-sasl-saslauthd
BuildRequires:  db-devel
BuildRequires:  krb5-devel
BuildRequires:  libtool
BuildRequires:  mysql-devel
BuildRequires:  openldap2-devel
BuildRequires:  opie
BuildRequires:  pam-devel
BuildRequires:  postgresql-devel
Summary:        The SASL Authentication Server
License:        BSD-4-Clause
Group:          Productivity/Networking/Other
Version:        2.1.25
Release:        0
Source:         cyrus-sasl-%{version}.tar.bz2
Source1:        cyrus-sasl-rc.tar.bz2
Source2:        README.Source
Source3:        baselibs.conf
Patch:          cyrus-sasl.dif
Patch1:         shared_link_on_ppc.patch
Patch2:         cyrus-sasl-gcc4.patch
Patch3:         cyrus-sasl-gs2-not-overwrite-minor-error-code.dif
Patch4:         gssapi-null-deref.dif
Patch5:         cyrus-sasl-no_rpath.patch
Patch6:         cyrus-sasl-lfs.patch
Patch7:         Fix-abort_if_no_fqdn-behavior.patch
Patch8:         cyrus-sasl-db6.diff
PreReq:         %insserv_prereq %fillup_prereq
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

This daemon is required when using cyrus-sasl in server software that
should authenticate with PAM, for example.

%package -n     cyrus-sasl-ldap-auxprop
Summary:        The cyrus-sasl LDAP auxprop plugin
Group:          Productivity/Networking/Other
Requires:       cyrus-sasl = %{version}

%description -n cyrus-sasl-ldap-auxprop
The LDAP auxprop plugin allows for tighter application/directory

%package -n     cyrus-sasl-sqlauxprop
Summary:        SQL auxprop plugin for cyrus-sasl
Group:          Development/Libraries/C and C++
Requires:       cyrus-sasl = %{version}

%description -n cyrus-sasl-sqlauxprop
The SQL auxprop plugin supports PostgreSQL and MySQL

%setup -n cyrus-sasl-%{version} -a 1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch7 -p1
%patch -P 8 -p1

find . -name \*.cvsignore -print0 | xargs -0 rm -vf
autoreconf -f -i
export CFLAGS="-fno-strict-aliasing $RPM_OPT_FLAGS -DLDAP_DEPRECATED"
%configure --with-plugindir=%{_libdir}/sasl2 \
            --with-configdir=/etc/sasl2/:%{_libdir}/sasl2 \
            --with-saslauthd=/var/run/sasl2/ \
            --enable-checkapop=no \
            --enable-cram=no \
            --enable-digest=no \
            --enable-otp=no \
            --enable-srp=no \
            --enable-plain=no \
            --enable-anon=no \
            --enable-ntlm=no \
            --enable-passdss=no \
            --enable-sample=no \
            --enable-login=no \
            --enable-gssapi=no \
            --enable-gs2=no \
            --enable-scram=no \
            --enable-krb4=no \
            --enable-sql \
            --with-mysql=/usr/include/mysql \
            --with-pgsql=/usr/include/pgsql \
            --enable-ldapdb=yes \
            --with-pam \
make sasldir=%{_libdir}/sasl2 %{?_smp_mflags}

cd plugins
make DESTDIR=$RPM_BUILD_ROOT sasldir=%{_libdir}/sasl2 install
cd ..
cd saslauthd
make DESTDIR=$RPM_BUILD_ROOT sasldir=%{_libdir}/sasl2 install
install -m 755 -d $RPM_BUILD_ROOT/var/run/sasl2
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man8
install -m 644 saslauthd.mdoc $RPM_BUILD_ROOT/%{_mandir}/man8/saslauthd.8
mkdir -p $RPM_BUILD_ROOT/usr/bin
install -m 755 testsaslauthd $RPM_BUILD_ROOT/usr/bin/testsaslauthd
cd -
install -D -m 755 SuSE/rc.saslauthd $RPM_BUILD_ROOT/etc/init.d/saslauthd
mkdir -p $RPM_BUILD_ROOT/sbin
ln -sf ../etc/init.d/saslauthd $RPM_BUILD_ROOT/sbin/rcsaslauthd
install -D -m 644 SuSE/sysconfig.saslauthd $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.saslauthd
rm -f $RPM_BUILD_ROOT/%{_mandir}/cat?/*
rm -f $RPM_BUILD_ROOT/%{_libdir}/sasl2/libsasldb*
rm -f $RPM_BUILD_ROOT/%{_libdir}/sasl2/
rm -f $RPM_BUILD_ROOT/%{_libdir}/sasl2/

%stop_on_removal saslauthd

%restart_on_update saslauthd

%{fillup_and_insserv -n saslauthd}

%dir %attr(0755, root, root) %ghost /var/run/sasl2   
%config /etc/init.d/saslauthd
%doc %{_mandir}/man8/*.gz
%doc saslauthd/AUTHORS saslauthd/COPYING saslauthd/ChangeLog saslauthd/LDAP_SASLAUTHD saslauthd/NEWS saslauthd/README

%files -n cyrus-sasl-sqlauxprop

%files -n cyrus-sasl-ldap-auxprop

openSUSE Build Service is sponsored by