%define real_name Authen-Krb5-Simple

Summary:        Basic user authentication using Kerberos 5
Name:           perl-%{real_name}
Version:        0.43
Release:        2%{?_dist_release}
License:        Artistic or GPL+
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/Authen-Krb5-Simple/

Source:         http://search.cpan.org/CPAN/authors/id/D/DS/DSTUART/Authen-Krb5-Simple-%{version}.tar.gz

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:  perl
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(Test::More)
BuildRequires:  krb5-devel
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))


%description
The Authen::Krb5::Simple module provides a means to authenticate a
user/password using Kerberos 5 protocol. The module's authenticate function
takes a username (or user@kerberos_realm) and a password, and authenticates
that user using the local Kerberos 5 installation. It was initially created to
allow perl scripts to perform authentication against a Microsoft Active
Directory (AD) server configured to accept Kerberos client requests.

It is important to note: This module only performs simple authentication. It
does not get, grant, use, or retain any kerberos tickets. It will check user
credentials against the Kerberos server (as configured on the local system)
each time the authenticate method is called.

%prep
%setup -q -n %{real_name}-%{version}

%build
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null
%{_fixperms} %{buildroot}

%check
make test

%clean
rm -rf %{buildroot}

%files
%defattr(-, root, root, -)
%doc Changes MANIFEST README 
%{perl_vendorarch}/*
%{_mandir}/man3/*

%changelog
* Mon Dec 22 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 0.43-2
- rebuilt with perl 5.16.3

* Sat Mar 10 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.43-1
- initial build for Vine Linux
