You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
perl-MooseX-Types-Path-Class/perl-MooseX-Types-Path-Clas...

97 lines
2.8 KiB

Name: perl-MooseX-Types-Path-Class
Version: 0.05
Release: 3%{?dist}
# see Makefile.PL, README, lib/MooseX/Types/Path/Class.pm
License: GPL+ or Artistic
Group: Development/Libraries
Summary: A Path::Class type library for Moose
Source: http://search.cpan.org/CPAN/authors/id/T/TH/THEPLER/MooseX-Types-Path-Class-%{version}.tar.gz
Url: http://search.cpan.org/dist/MooseX-Types-Path-Class
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
BuildArch: noarch
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(MooseX::Getopt) >= 0.05
BuildRequires: perl(MooseX::Types) >= 0.04
BuildRequires: perl(Path::Class) >= 0.16
# testing
BuildRequires: perl(Test::More) >= 0.62
# optional tests
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod::Coverage)
%description
MooseX::Types::Path::Class creates common Moose types, coercions and option
specifications useful for dealing with Path::Class objects as Moose attributes.
Coercions (see Moose::Util::TypeConstraints) are made from both 'Str' and
'ArrayRef' to both Path::Class::Dir and Path::Class::File objects. If you
have MooseX::Getopt installed, the Getopt option type ("=s") will be added
for both Path::Class::Dir and Path::Class::File.
%prep
%setup -q -n MooseX-Types-Path-Class-%{version}
perl -pi -e 's|^#!perl|#!%{__perl}|' t/*.t
# make sure doc/tests don't generate provides
# note we first filter out the bits in _docdir...
cat << \EOF > %{name}-prov
#!/bin/sh
%{__perl_provides} `perl -p -e 's|\S+%{_docdir}/%{name}-%{version}\S+||'`
EOF
%define __perl_provides %{_builddir}/MooseX-Types-Path-Class-%{version}/%{name}-prov
chmod +x %{__perl_provides}
cat << \EOF > %{name}-req
#!/bin/sh
%{__perl_requires} `perl -p -e 's|\S+%{_docdir}/%{name}-%{version}\S+||'`
EOF
%define __perl_requires %{_builddir}/MooseX-Types-Path-Class-%{version}/%{name}-req
chmod +x %{__perl_requires}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make pure_install PERL_INSTALL_ROOT=%{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 README t/
%{perl_vendorlib}/*
%{_mandir}/man3/*.3*
%changelog
* Sun Nov 16 2008 Chris Weyl <cweyl@alumni.drew.edu> 0.05-3
- bump
* Fri Nov 07 2008 Chris Weyl <cweyl@alumni.drew.edu> 0.05-2
- filter _docdir prov/req's
* Sat Nov 01 2008 Chris Weyl <cweyl@alumni.drew.edu> 0.05-1
- update to 0.05
- brush up for submission
* Tue Oct 07 2008 Chris Weyl <cweyl@alumni.drew.edu> 0.04-1
- initial RPM packaging
- generated with cpan2dist (CPANPLUS::Dist::RPM version 0.0.1)