File pam_ldap.spec of Package pam_ldap

#
# spec file for package pam_ldap
#
# Copyright (c) 2014 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:           pam_ldap
BuildRequires:  automake
BuildRequires:  openldap2-devel
BuildRequires:  pam-devel
# bug437293
%ifarch ppc64
Obsoletes:      pam_ldap-64bit
%endif
#
Version:        186
Release:        0
Summary:        A PAM Module for LDAP Authentication
License:        LGPL-2.1+
Group:          Productivity/Networking/LDAP/Clients
Url:            http://www.padl.com/OSS/pam_ldap.html
Source:         pam_ldap-%{version}.tar.bz2
Source1:        README.SUSE
Source2:        baselibs.conf
Patch:          pam_ldap.patch
Patch1:         pam_ldap-arm-linux-gnueabi.patch
Patch2:         pam_ldap-expirewarning.dif
Patch3:         pam_ldap-chauthtok-errcode.dif
Patch4:         0004-fix-bind-timelimit-description.patch
Patch5:		add-pwd-to-INC.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
This is a PAM Module that handles LDAP. The advantages of this pecular
version are:

Possibility to change LDAP passwords in the directory

Compatibility with the nss_ldap configuration file format

%prep
%setup
%patch -E
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p0
cp -v  %{S:1} .

%build
autoreconf -fiv
export CFLAGS="%optflags -fno-strict-aliasing"
%configure --enable-nds \
           --with-ldap-lib=openldap \
           --libdir=/%{_lib}
make %{?_smp_Mflags}

%install
make DESTDIR=$RPM_BUILD_ROOT install
rm $RPM_BUILD_ROOT/etc/ldap.conf

%files
%defattr(-,root,root)
%doc COPYING.LIB README README.SUSE ChangeLog ldap.conf pam.d
%doc %{_mandir}/man5/pam_ldap*
/%{_lib}/security/pam_ldap.so

%changelog
openSUSE Build Service is sponsored by