#
# Conditional build:
-%bcond_with gss # use gss instead of MIT as GSSAPI implementation
+%bcond_without apidocs # disable gtk-doc
+%bcond_with gss # use gss instead of Heimdal as GSSAPI implementation
%bcond_with kerberos5 # with KERBEROS_V5 mechanism (based on shishi, currently broken)
+%bcond_without heimdal # do not use Heimdal either
%bcond_without ntlm # without NTLM mechanism
%bcond_without static_libs # don't build static libraries
#
Summary: GNU SASL - implementation of the Simple Authentication and Security Layer
Summary(pl.UTF-8): GNU SASL - implementacja Simple Authentication and Security Layer
Name: gsasl
-Version: 0.2.25
+Version: 1.8.0
Release: 2
License: LGPL v2.1+ (library), GPL v3+ (gsasl tool)
Group: Libraries
-Source0: http://josefsson.org/gsasl/releases/%{name}-%{version}.tar.gz
-# Source0-md5: a7e52085a745a6c211b6618a86ad669d
+Source0: http://ftp.gnu.org/gnu/gsasl/%{name}-%{version}.tar.gz
+# Source0-md5: 982fe54a20016aa46a871c084c990c36
Patch0: %{name}-info.patch
-Patch1: %{name}-pl.po-update.patch
+Patch1: %{name}-heimdal-check.patch
+Patch2: %{name}-link.patch
URL: http://www.gnu.org/software/gsasl/
BuildRequires: autoconf >= 2.61
BuildRequires: automake >= 1:1.10
-BuildRequires: gettext-devel >= 0.16.1
+BuildRequires: docbook-dtd412-xml
+BuildRequires: gettext-tools >= 0.18.1
BuildRequires: gnutls-devel >= 1.2.0
-%{?with_gss:BuildRequires: gss-devel >= 0.0.0}
-BuildRequires: gtk-doc >= 1.1
-BuildRequires: libgcrypt-devel >= 1.1.42
+%{?with_gss:BuildRequires: gss-devel >= 1.0.0}
+%{?with_apidocs:BuildRequires: gtk-doc >= 1.1}
+# used by examples/saml20 (noinst only)
+#BuildRequires: lasso-devel >= 2.2.1
+BuildRequires: libgcrypt-devel >= 1.3.0
BuildRequires: libidn-devel >= 0.1.0
%{?with_ntlm:BuildRequires: libntlm-devel >= 0.3.5}
BuildRequires: libtool >= 2:1.5
BuildRequires: pkgconfig
-# alternatively, gss or heimdal can be used for GSSAPI
-%{!?with_gss:BuildRequires: krb5-devel}
+%if %{without gss}
+# alternatively, gss or krb5 can be used for GSSAPI
+%{?with_heimdal:BuildRequires: heimdal-devel}
+%endif
%{?with_kerberos5:BuildRequires: shishi-devel}
BuildRequires: texinfo
Requires(post,postun): /sbin/ldconfig
+Requires: libgcrypt >= 1.3.0
%{?with_ntlm:Requires: libntlm >= 0.3.5}
Obsoletes: libgsasl
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
License: LGPL v2.1+
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
-%{?with_gss:Requires: gss-devel >= 0.0.0}
-Requires: libgcrypt-devel >= 1.1.42
+%if %{with gss}
+Requires: gss-devel >= 1.0.0
+%else
+%{?with_heimdal:Requires: heimdal-devel}
+%endif
+Requires: libgcrypt-devel >= 1.3.0
Requires: libidn-devel >= 0.1.0
%{?with_ntlm:Requires: libntlm-devel >= 0.3.5}
-%{!?with_gss:Requires: krb5-devel}
%{?with_kerberos5:Requires: shishi-devel}
Obsoletes: libgsasl-devel
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
-rm -f m4/{libtool.m4,lt*} lib/m4/{libtool.m4,lt*}
+%{__rm} po/stamp-po
+
+# remove it when "linking libtool libraries using a non-POSIX archiver ..." warning is gone
+# (after gsasl or libtool change)
+%{__sed} -i -e '/AM_INIT_AUTOMAKE/s/-Werror//' configure.ac lib/configure.ac
%build
%{__gettextize}
%{__automake}
cd -
%configure \
- --enable-gtk-doc \
+ --disable-silent-rules \
+ %{?with_apidocs:--enable-gtk-doc} \
%{!?with_ntlm:--disable-ntlm} \
%{!?with_static_libs:--disable-static} \
%{?with_kerberos5:--enable-kerberos_v5} \
- %{!?with_gss:--with-gssapi-impl=mit} \
+%if %{with gss}
+ --with-gssapi-impl=gss
+%else
+ %{?with_heimdal:--with-gssapi-impl=heimdal} \
+ %{!?with_heimdal:--with-gssapi-impl=no} \
+%endif
--with-html-dir=%{_gtkdocdir} \
--with-libgcrypt
%{_includedir}/gsasl*.h
%{_pkgconfigdir}/libgsasl.pc
%{_mandir}/man3/gsasl_*.3*
-%{_gtkdocdir}/gsasl
+%{?with_apidocs:%{_gtkdocdir}/gsasl}
%if %{with static_libs}
%files static