Blob Blame History Raw
%if 0%{?fedora} <=14
%define auto %{perl_archlib}/auto
%define archlib %{perl_archlib}
%endif
%if 0%{?fedora} >= 15
%define auto %{perl_vendorarch}/auto
%define archlib %{perl_vendorarch}
%endif
%if 0%{?rhel} <= 5
%define auto %{perl_vendorarch}/auto
%define archlib %{perl_vendorarch}
%endif
%if 0%{?rhel} >= 6
%define auto %{perl_vendorarch}/auto
%define archlib %{perl_vendorarch}
%endif
%define _use_internal_dependency_generator 1

Name:           perl-Crypt-Cracklib
Version:        1.7
Release:        1%{?dist}
Summary:        Crypt-Cracklib - Perl interface to Alec Muffett's Cracklib

Group:          Development/Libraries
License:        GPL+ or Artistic
URL:            http://search.cpan.org/dist/Crypt-Cracklib/
Source0:        http://search.cpan.org/CPAN/authors/id/D/DA/DANIEL/Crypt-Cracklib-1.7.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%if 0%{?rhel} <= 5
BuildRequires:  perl(ExtUtils::MakeMaker), cracklib, perl-Test-Pod, perl-Test-Pod-Coverage, perl-Pod-Coverage
%endif

%if 0%{?rhel} >= 6
BuildRequires:  perl(ExtUtils::MakeMaker), cracklib-devel, perl-Test-Pod, perl-Test-Pod-Coverage
%endif

%if 0%{?fedora} >= 12
BuildRequires:  perl(ExtUtils::MakeMaker), cracklib-devel, perl-Test-Pod, perl-Test-Pod-Coverage, perl-Test-Simple
%endif

Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Patch0: automake.patch

%description
This module providers interaction with the system cracklib libraries.

%prep
%setup -q -n Crypt-Cracklib-%{version}
%patch0 -p0 -b .automake

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}

%check
make test

%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} ';' 2>/dev/null
%{_fixperms} $RPM_BUILD_ROOT/*
find $RPM_BUILD_ROOT -name Cracklib.bs -exec rm -f {} ';'

mkdir -p -m0700 $RPM_BUILD_ROOT%{_defaultdocdir}/perl-Crypt-Cracklib-%{version}
install -m 0644 Changes $RPM_BUILD_ROOT%{_defaultdocdir}/perl-Crypt-Cracklib-%{version}/Changes
install -m 0644 README $RPM_BUILD_ROOT%{_defaultdocdir}/perl-Crypt-Cracklib-%{version}/README

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%dir %{auto}/Crypt
%dir %{auto}/Crypt/Cracklib
%{archlib}/Crypt/Cracklib.pm
%{auto}/Crypt/Cracklib/*
%{_mandir}/man3/*.3*
%doc Changes README

%changelog
* Sun Feb 5 2011 Carl Thompson <fedora@red-dragon.com> 1.7-1
- upgraded to version 1.7
- added patch to remove AutoMake functions of perl so its
- dependant on packages
- updated spec to work with fedora and epel builds
- updated spec to deal with perl module install paths
* Wed Jul 28 2010 Carl Thompson <fedora@red-dragon.com> 1.5-3
- update files section for cleaner docs list
- removed epoch
- added Crypt as a directory owned by package
* Tue Jul 27 2010 Carl Thompson <fedora@red-dragon.com> 1:1.5-2
- added check section to spec
- removed BUILD_ROOT check in install and clean
- included the README and Changes files to the installation
- re enabled the internal dependancy checks
* Tue Jul 20 2010 Carl Thompson <fedora@red-dragon.com> 1:1.5-1
- update to 1.5
* Sat Jul 17 2010 Carl Thompson <fedora@red-dragon.com> 1:1.4-1
- initial build