cyrus-sasl/cyrus-sasl.spec

255 lines
7.2 KiB
RPMSpec
Raw Normal View History

#
# spec file for package cyrus-sasl
#
# Copyright (c) 2012 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 http://bugs.opensuse.org/
#
Name: cyrus-sasl
Version: 2.1.25
Release: 14
BuildRequires: db-devel krb5-mini-devel openssl-devel opie pam-devel
BuildRequires: libtool
License: BSD-4-Clause
Group: Productivity/Networking/Other
Url: http://asg.web.cmu.edu/sasl/
# bug437293
%ifarch ppc64
Obsoletes: cyrus-sasl-64bit
%endif
#
Summary: Implementation of Cyrus SASL API
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
PreReq: %insserv_prereq %fillup_prereq
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%package gssapi
License: BSD-4-Clause
Summary: Plugin for the GSSAPI SASL mechanism
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%package crammd5
License: BSD-4-Clause
Summary: Plugin for the CRAMMD5 SASL mechanism
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%package digestmd5
License: BSD-4-Clause
Summary: Plugin for the DIGESTMD5 SASL mechanism
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%package otp
License: BSD-4-Clause
Summary: Plugin for the OTP SASL mechanism
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%package plain
License: BSD-4-Clause
Summary: Plugin for the PLAIN SASL mechanism
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
%package ntlm
License: BSD-4-Clause
Summary: Plugin for the NTLM SASL mechanism
Group: Productivity/Networking/Other
Requires: %{name} = %{version}
%package gs2
License: BSD-4-Clause
Summary: Plugin for the GS2 SASL mechanism
Group: Productivity/Networking/Other
Requires: %{name} = %{version}
%package scram
License: BSD-4-Clause
Summary: Plugin for the SCRAM SASL mechanism
Group: Productivity/Networking/Other
Requires: %{name} = %{version}
%package devel
License: BSD-4-Clause
# bug437293
%ifarch ppc64
Obsoletes: cyrus-sasl-devel-64bit
%endif
#
Summary: Cyrus SASL API Implementation, Libraries and Header Files
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}, glibc-devel
%description
This is the Cyrus SASL API. It can be used on the client or server side
to provide authentication. See RFC 2222 for more information.
%description gssapi
This is the Cyrus SASL API implementation. It can be used on the client
or server side to provide authentication. See RFC 2222 for more
information.
%description devel
This is the Cyrus SASL API. It can be used on the client or server side
to provide authentication. See RFC 2222 for more information.
%description digestmd5
This is the Cyrus SASL API implementation. It can be used on the client
or server side to provide authentication. See RFC 2222 for more
information.
%description crammd5
This is the Cyrus SASL API implementation. It can be used on the client
or server side to provide authentication. See RFC 2222 for more
information.
%description otp
This is the Cyrus SASL API implementation. It can be used on the client
or server side to provide authentication. See RFC 2222 for more
information.
%description plain
This is the Cyrus SASL API implementation. It can be used on the client
or server side to provide authentication. See RFC 2222 for more
information.
%description ntlm
This is the Cyrus SASL API. It can be used on the client or server side
to provide authentication. See RFC 2222 for more information.
%description gs2
This is the Cyrus SASL API implementation. It can be used on the client
or server side to provide authentication. See RFC 2222 for more
information.
%description scram
This is the Cyrus SASL API implementation. It can be used on the client
or server side to provide authentication. See RFC 2222 for more
information.
%prep
%setup -q -n cyrus-sasl-%{version} -a 1
if [ -e %{_builddir}/%{name}-%{version}/dlcompat-*/ ]
then
echo "dlcompat contains potential legal risks."
exit 1;
fi
%patch
%patch1
%patch2
%patch3 -p1
%patch4 -p1
%build
find . -name \*.cvsignore -print0 | xargs -0 rm -fv
autoreconf -f -i
export CFLAGS="-fno-strict-aliasing $RPM_OPT_FLAGS"
%configure --with-pic \
--with-plugindir=%{_libdir}/sasl2 \
--with-configdir=/etc/sasl2/:%{_libdir}/sasl2 \
--with-saslauthd=/var/run/sasl2/ \
--enable-pam \
--enable-sample \
--enable-login \
--enable-gssapi \
--enable-ntlm \
--enable-krb4=no \
--enable-sql=no \
--with-devrandom=/dev/urandom
%{__make} %{?_smp_mflags} sasldir=%{_libdir}/sasl2
%install
make DESTDIR=$RPM_BUILD_ROOT sasldir=%{_libdir}/sasl2 install
mkdir -p $RPM_BUILD_ROOT/usr/bin
mkdir -p $RPM_BUILD_ROOT/etc/sasl2
install -m 755 sample/.libs/client $RPM_BUILD_ROOT/usr/bin/cyrus_sasl_sample_client
install -m 755 sample/.libs/server $RPM_BUILD_ROOT/usr/bin/cyrus_sasl_sample_server
chmod 0644 doc/*
rm -f doc/Makefile*
rm -f $RPM_BUILD_ROOT/%{_mandir}/cat?/*
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/saslauthd*
rm -f $RPM_BUILD_ROOT/usr/sbin/saslauthd
rm -f $RPM_BUILD_ROOT/usr/sbin/testsaslauthd
find $RPM_BUILD_ROOT -type f -name "*.la" -exec %{__rm} -fv {} +
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root)
%dir %{_libdir}/sasl2
%dir /etc/sasl2/
%{_libdir}/sasl2/libanonymous.so*
%{_libdir}/sasl2/liblogin.so*
%{_libdir}/sasl2/libsasldb.so*
%{_libdir}/libsasl2.so.*
/usr/sbin/*
/usr/bin/*
%doc %{_mandir}/man3/sasl.*.gz
%doc %{_mandir}/man8/*.gz
%doc COPYING
%files gssapi
%defattr(-,root,root)
%{_libdir}/sasl2/libgssapiv2.so*
%files crammd5
%defattr(-,root,root)
%{_libdir}/sasl2/libcrammd5.so*
%files digestmd5
%defattr(-,root,root)
%{_libdir}/sasl2/libdigestmd5.so*
%files otp
%defattr(-,root,root)
%{_libdir}/sasl2/libotp.so*
%files plain
%defattr(-,root,root)
%{_libdir}/sasl2/libplain.so*
%files ntlm
%defattr(-,root,root)
%{_libdir}/sasl2/libntlm.so*
%files gs2
%defattr(-,root,root)
%{_libdir}/sasl2/libgs2.so*
%files scram
%defattr(-,root,root)
%{_libdir}/sasl2/libscram.so*
%files devel
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README doc
/usr/include/sasl
%doc %{_mandir}/man3/sasl_*.gz
%{_libdir}/libsasl2.so
%changelog