File perl-ldap.spec of Package perl-ldap

#
# spec file for package perl-ldap
#
# Copyright (c) 2012 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:           perl-ldap
Version:        0.44
Release:        0
Summary:        Client Interface for LDAP Servers
License:        GPL-1.0+ or Artistic-1.0
Group:          Development/Libraries/Perl
Url:            http://cpan.org/modules/by-module/Net/
Source:         perl-ldap-%{version}.tar.gz
BuildRequires:  perl-Authen-SASL
BuildRequires:  perl-Convert-ASN1
BuildRequires:  perl-IO-Socket-SSL
BuildRequires:  perl-XML-Parser
BuildRequires:  perl-macros
Requires:       perl-Convert-ASN1
Requires:       perl-URI
Requires:       perl-XML-Parser
Provides:       perl-Net-LDAP = %{version}
Provides:       perl_ldp
Obsoletes:      perl-Net-LDAP < %{version}
Obsoletes:      perl_ldp
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{perl_requires}

%description
A Client interface for LDAP servers.

%package ssl
Summary:        SSL Extension to perl-ldap
License:        Artistic-1.0
Group:          Development/Libraries/Perl
Requires:       %{name} = %{version}
Requires:       perl-IO-Socket-SSL
Provides:       p_ldaps
Obsoletes:      p_ldaps
%{perl_requires}

%description ssl
A Client interface for LDAP servers.

%prep
%setup -q -n perl-ldap-%{version}

%build
# Prevent rpmlint warning script-without-shebang
chmod -x lib/Net/LDAP/DSML.pm
find contrib -type f | xargs -n 1 sed -i "s@/usr/local/bin/perl@/usr/bin/perl@"
perl Makefile.PL
make %{?_smp_mflags}

%check
make test

%install
make DESTDIR=%{buildroot} install_vendor
%perl_process_packlist

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc CREDITS Changes README SIGNATURE TODO contrib
%doc %{_mandir}/man3/Net::LDAP.3pm*
%doc %{_mandir}/man3/Net::LDAPI.3pm*
%doc %{_mandir}/man3/Net::LDAP::*
%doc %{_mandir}/man3/Bundle::Net::LDAP.3pm*
%dir %{perl_vendorlib}/Net
%{perl_vendorlib}/Net/LDAP
%{perl_vendorlib}/Net/LDAP.*
%{perl_vendorlib}/Net/LDAPI.pm
%{perl_vendorlib}/Bundle
%{perl_vendorlib}/LWP
%{perl_vendorarch}/auto/Net/LDAP

%files ssl
%defattr(-,root,root)
%doc %{_mandir}/man3/Net::LDAPS.3pm*
%dir %{perl_vendorlib}/Net
%{perl_vendorlib}/Net/LDAPS.pm

%changelog
openSUSE Build Service is sponsored by