File libnldapx.spec of Package libnldapx

#
# spec file for package libnldapx (Version 1.0)
#
# Copyright (c) 2010 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:           libnldapx
BuildRequires:  db-devel gcc-c++ openldap2-devel openssl-devel
Group:          Productivity/Networking/LDAP/Clients
AutoReqProv:    on
Summary:        The Novell LDAP Extended Library
Version:        1.0
Release:        5
Source0:        novell-ldapextd-1.0.0.tar.bz2
Source1:        configure.in
Patch1:         %{name}_code11.patch.bz2
Patch2:         openssl.patch
Url:            http://developer.novell.com/wiki/index.php/Novell_LDAP_Extended_Library
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
License:        LGPLv2.1+
%define buildsys   %{_target_cpu}-suse-%{_build_os}

%description
This library(libnldapx) dynamically links to OpenLDAP SDK(libldap) for
all basic SDK functionality and OpenSSL(libssl) present on platform and
provides the below mentioned featuears on top of it: SSL related
functionalities : Novell LDAP Extended Library provides the APIs to
setup the client SSL information which are not covered in  the IETF
draft. These APIs implement the intent of the draft and simplify the
interface to the developer by providing functionalities like SSL bind ,
Interactive SSL. Schema functionalities      : A set of APIs are
provided to modify (add, delete) and fetch the schema from an
eDirectory server over LDAP. LDAP Extensions		 : These are
the LDAP extensions which support the special features of Novell
eDirectory such as replication, partitioning and events. The
availability of these operations are subject to the specific
implementation of the LDAP Server .



%package -n libnldapx0
License:        LGPLv2.1+
Summary:        The Novell LDAP Extended Library
Group:          Productivity/Networking/LDAP/Clients
Provides:       %{name} = %{version}
Provides:       ldapextd
Provides:       novell-nldapextd
Obsoletes:      novell-nldapextd

%description -n libnldapx0
This library(libnldapx) dynamically links to OpenLDAP SDK(libldap) for
all basic SDK functionality and OpenSSL(libssl) present on platform and
provides the below mentioned featuears on top of it: SSL related
functionalities : Novell LDAP Extended Library provides the APIs to
setup the client SSL information which are not covered in  the IETF
draft. These APIs implement the intent of the draft and simplify the
interface to the developer by providing functionalities like SSL bind ,
Interactive SSL. Schema functionalities      : A set of APIs are
provided to modify (add, delete) and fetch the schema from an
eDirectory server over LDAP. LDAP Extensions		 : These are
the LDAP extensions which support the special features of Novell
eDirectory such as replication, partitioning and events. The
availability of these operations are subject to the specific
implementation of the LDAP Server .



%package devel
License:        LGPLv2.1+
Summary:        The Novell LDAP Extended Library - Include files and Libraries
Group:          Development/Languages/C and C++
Provides:       ldapextnd-devel
Provides:       novell-nldapextd-devel
Obsoletes:      novell-nldapextd-devel
Requires:       %{name} = %{version}

%description devel
This library(libnldapx) dynamically links to OpenLDAP SDK(libldap) for
all basic SDK functionality and OpenSSL(libssl) present on platform and
provides the below mentioned featuears on top of it: SSL related
functionalities : Novell LDAP Extended Library provides the APIs to
setup the client SSL information which are not covered in  the IETF
draft. These APIs implement the intent of the draft and simplify the
interface to the developer by providing functionalities like SSL bind ,
Interactive SSL. Schema functionalities      : A set of APIs are
provided to modify (add, delete) and fetch the schema from an
eDirectory server over LDAP. LDAP Extensions		 : These are
the LDAP extensions which support the special features of Novell
eDirectory such as replication, partitioning and events. The
availability of these operations are subject to the specific
implementation of the LDAP Server .



%prep
%setup -n novell-ldapextd-1.0.0
cp -a %{SOURCE1} .
%patch1 -p1  
%patch2 -p0
# since shtool comes from Patch1, need to chmod it to execute
chmod u+x build/shtool

%build
%{?suse_update_config:%{suse_update_config -f build}}
export DEBUG=-DDEBUG
export CFLAGS="$RPM_OPT_FLAGS -g -fno-strict-aliasing"
autoconf
CC=$CC ./configure \
	--prefix=/usr/ \
	--libdir=/usr/%{_lib} \
	--build=%{buildsys} \
	--disable-debug \
	--enable-dynamic \
	--disable-static \
	--with-tls=no \
	--with-cyrus-sasl=no
make

%install
make install DESTDIR=$RPM_BUILD_ROOT
rm -rf $RPM_BUILD_ROOT/usr/samples
find /$RPM_BUILD_ROOT -name \*.la -print0 | xargs -0 rm -f
(cd $RPM_BUILD_ROOT/usr/include && ln -s novell-ldapextd libldapx)

%post -n libnldapx0 -p /sbin/ldconfig

%postun -n libnldapx0 -p /sbin/ldconfig

%files -n libnldapx0
%defattr(-,root,root)
/usr/%{_lib}/libnldapx.so.0.0.0
/usr/%{_lib}/libnldapx.so.0

%files devel
%defattr(-,root,root)
%dir /usr/include/novell-ldapextd
/usr/include/libldapx
/usr/%{_lib}/libnldapx.so
/usr/include/novell-ldapextd/ldap_config.h
/usr/include/novell-ldapextd/lber_types.h
/usr/include/novell-ldapextd/ldap_events.h
/usr/include/novell-ldapextd/ldap_features.h
/usr/include/novell-ldapextd/ldap_ssl.h
/usr/include/novell-ldapextd/ldap_schema.h
/usr/include/novell-ldapextd/ldapx.h
/usr/include/novell-ldapextd/ldap_ds_constants.h

%clean
rm -rf $RPM_BUILD_ROOT

%changelog