File pam_ldap.spec of Package pam_ldap

#
# spec file for package pam_ldap (Version 185)
#
# 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/
#

# norootforbuild


Name:           pam_ldap
BuildRequires:  openldap2-devel pam-devel
License:        LGPLv2.1+
Group:          Productivity/Networking/LDAP/Clients
AutoReqProv:    on
# bug437293
%ifarch ppc64
Obsoletes:      pam_ldap-64bit
%endif
#
Version:        185
Release:        2
Summary:        A PAM Module for LDAP Authentication
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
Patch2:         pam_ldap-expirewarning.dif
Patch3:         pam_ldap-chauthtok-errcode.dif
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



Authors:
--------
    PADL Software Pty Ltd <dev@padl.com>

%prep
%setup
%patch -E
%patch2 -p1
%patch3 -p1
cp -v  %{S:1} .
%{suse_update_libdir README pam_ldap.c pam.conf}

%build
%{suse_update_config -f}
autoreconf
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" ./configure --enable-nds \
                                    --with-ldap-lib=openldap \
				    --libdir=/%{_lib} \
                                    --mandir=%{_mandir} \
				    --sysconfdir=/etc
make

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

%clean
rm -rf $RPM_BUILD_ROOT

%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