Blob Blame History Raw
# Note:
#
# Build.PL complains about Attribute::Handlers < 0.79 in EL-4 (we have 0.78_01).
# This is a reference to CPAN RT#44066, where it says that there was an API
# change in Attribute::Handlers, making Attribute::Params::Validate
# incompatible. However, the test suite still passes and the version of
# Attribute::Params::Validate in Params::Validate 0.89 (the first EPEL-4
# release) is exactly the same as in Params::Validate 0.95, so this problem
# has always been present in EPEL-4.

Summary:	Params-Validate Perl module
Name:		perl-Params-Validate
Version:	0.95
Release:	1%{?dist}
License:	GPL+ or Artistic
Group:		Development/Libraries
URL:		http://search.cpan.org/dist/Params-Validate/
Source0:	http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Params-Validate-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:	perl(ExtUtils::CBuilder)
BuildRequires:	perl(Module::Build)
BuildRequires:	perl(Pod::Man)
BuildRequires:	perl(Readonly)
BuildRequires:	perl(Readonly::XS)
BuildRequires:	perl(Test::Pod)
BuildRequires:	perl(Test::Pod::Coverage)
BuildRequires:	perl(Test::Taint)
Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%description
The Params::Validate module allows you to validate method or function
call parameters to an arbitrary level of specificity. At the simplest
level, it is capable of validating the required parameters were given
and that no unspecified additional parameters were passed in. It is
also capable of determining that a parameter is of a specific type,
that it is an object of a certain class hierarchy, that it possesses
certain methods, or applying validation callbacks to arguments.

%prep
%setup -q -n Params-Validate-%{version}

# Remove redundant unversioned provide
%global provfilt /bin/sh -c "%{__perl_provides} | %{__grep} -Fvx 'perl(Params::Validate)'"
%define __perl_provides %{provfilt}

%build
%{__perl} Build.PL installdirs=vendor optimize="%{optflags}"
./Build

%install
%{__rm} -rf %{buildroot}
./Build install destdir=%{buildroot} create_packlist=0
/usr/bin/find %{buildroot} -type f -name '*.bs' -a -size 0 -exec %{__rm} -f {} ';'
/usr/bin/find %{buildroot} -depth -type d -exec /bin/rmdir {} \; 2>/dev/null
%{__chmod} -R u+w %{buildroot}

%check
LC_ALL=C AUTHOR_TESTING=1 ./Build test

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc Changes LICENSE README TODO
%{perl_vendorarch}/Params/
%{perl_vendorarch}/auto/Params/
%{perl_vendorarch}/Attribute/
%{_mandir}/man3/Attribute::Params::Validate.3pm*
%{_mandir}/man3/Params::Validate.3pm*
%{_mandir}/man3/Params::ValidatePP.3pm*
%{_mandir}/man3/Params::ValidateXS.3pm*

%changelog
* Wed Apr 21 2010 Paul Howarth <paul@city-fan.org> - 0.95-1
- Update to 0.95
- Add filter for unversioned provide
- Switch to Build.PL
- Enable AUTHOR_TESTING
- BR: perl(Pod::Man), perl(Test::Pod), perl(Test::Pod::Coverage)
- Make %%files list more specific

* Tue Nov 13 2007 Ralf Corsépius <rc040203@freenet.de> - 0.89-1
- Upstream update.

* Thu Sep 06 2007 Ralf Corsépius <rc040203@freenet.de> - 0.88-3
- Update license tag.

* Wed Aug 22 2007 Ralf Corsépius <rc040203@freenet.de> - 0.88-2
- Mass rebuild.

* Mon Mar 12 2007 Ralf Corsépius <rc040203@freenet.de> - 0.88-1
- BR: perl(ExtUtils::MakeMaker).
- Upstream update.

* Sat Jan 20 2007 Ralf Corsépius <rc040203@freenet.de> - 0.87-1
- Upstream update.

* Tue Sep 05 2006 Ralf Corsépius <rc040203@freenet.de> - 0.86-2
- Mass rebuild.

* Sun Aug 13 2006 Ralf Corsépius <rc040203@freenet.de> - 0.86-1
- Upstream update.

* Mon Jun 28 2006 Ralf Corsépius <rc040203@freenet.de> - 0.85-1
- Upstream update.

* Mon Jun 05 2006 Ralf Corsépius <rc040203@freenet.de> - 0.84-1
- Upstream update.

* Sun May 21 2006 Ralf Corsépius <rc040203@freenet.de> - 0.82-1
- Upstream update.

* Wed Apr 04 2006 Ralf Corsépius <rc040203@freenet.de> - 0.81-1
- Upstream update.

* Wed Feb 20 2006 Ralf Corsépius <rc040203@freenet.de> - 0.80-2
- Rebuild.

* Wed Feb 01 2006 Ralf Corsépius <rc040203@freenet.de> - 0.80-1
- Upstream update.

* Sat Jan 14 2006 Ralf Corsépius <rc040203@freenet.de> - 0.79-1
- Upstream update.
- BR perl(Readonly), perl(Readonly::XS).

* Sun Aug 14 2005 Ralf Corsepius <ralf@links2linux.de> - 0.78-2
- Spec file cleanup.

* Wed Aug 10 2005 Ralf Corsepius <ralf@links2linux.de> - 0.78-1
- FE submission.