File compat-libldap-2_3-0.spec of Package compat-libldap-2_3-0
#
# spec file for package compat-libldap-2_3-0
#
# Copyright (c) 2016 SUSE LINUX 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: compat-libldap-2_3-0
Version: 2.3.37
Release: 0
Summary: A legacy release of OpenLDAP client library
License: BSD-3-Clause and OLDAP-2.8 and OLDAP-2.8
Group: Productivity/Networking/LDAP/Clients
Url: http://www.openldap.org
Source: openldap-2.3.37.tgz
Patch0: openldap-2.3.37.dif
Patch1: openldap-2.3.37-libldap-suid.diff
Patch2: openldap-2.3.37-libldap-ldapi_url.dif
Patch3: openldap-2.3.37-libldap-ntlm.diff
Patch4: openldap-2.3.37-libldap-gethostbyname_r.dif
Patch5: openldap-2.3.37-libldap-sasl-max-buff-size.dif
Patch6: openldap-2.3.37-libldap-utf8-ADcanonical.dif
Patch7: openldap-2.3.37-liblber-length-decoding.dif
Patch8: openldap-2.3.37-libldap-ld_defconn-ldap_free_connection.dif
Patch9: openldap-2.3.37-libldap-tls_chkhost-its6239.dif
Patch10: openldap-2.3.37-libldap-ssl.dif
Patch11: 0011-Fix-ldap-host-lookup-ipv6.patch
Patch12: openldap-buildcompare.patch
BuildRequires: cyrus-sasl-devel
BuildRequires: db-devel
BuildRequires: groff
BuildRequires: libopenssl-devel
BuildRequires: libtool
BuildRequires: openslp-devel
BuildRequires: tcpd-devel
BuildRequires: unixODBC-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
OpenLDAP client libraries from 2.3 branch that was last maintained back in 2008.
%package -n libldap-2_3-0
Summary: A legacy release of OpenLDAP client library
Group: System/Libraries
Obsoletes: compat-libldap-2_3-0 < %version-%release
Provides: compat-libldap-2_3-0 = %version-%release
%description -n libldap-2_3-0
This package contains the OpenLDAP client libraries in version 2.3,
last maintained back in 2008.
%prep
%setup -q -n openldap-%{version}
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6
%patch7
%patch8
%patch9 -p1
%patch10
%patch11 -p1
%patch12 -p1
%build
%{?suse_update_config:%{suse_update_config -f build}}
autoreconf -fi
export CFLAGS="$RPM_OPT_FLAGS -Wno-format-extra-args -fno-strict-aliasing -DLDAP_DEPRECATED -DLDAP_CONNECTIONLESS"
%configure --localstatedir=%{_rundir}/slapd --libexecdir=/usr/lib/openldap \
--enable-aci \
--enable-hdb --enable-bdb --enable-ldbm --enable-crypt \
--enable-ipv6=no \
--enable-ldap --enable-monitor --enable-meta --enable-rewrite \
--enable-dynamic=no --enable-shared=yes
make depend
make -C libraries %{?_smp_mflags}
%install
pushd libraries
make DESTDIR=%{buildroot} install
popd
# Remove unneeded files
rm -f %{buildroot}%{_sysconfdir}/openldap/ldap.conf*
rm -f %{buildroot}%{_libdir}/lib{lber,ldap,ldap_r}.{a,la,so}
%post -n libldap-2_3-0 -p /sbin/ldconfig
%postun -n libldap-2_3-0 -p /sbin/ldconfig
%files -n libldap-2_3-0
%defattr(-,root,root)
%doc README LICENSE COPYRIGHT
%{_libdir}/liblber*2.3.so.*
%{_libdir}/libldap*2.3.so.*
%changelog