@ -1,15 +1,21 @@
# We need to patch the test suite if we have an old version of Test::More
%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0)
Name: perl-aliased
Name: perl-aliased
Version: 0.30
Version: 0.31
Release: 11%{?dist}
Release: 1%{?dist}
Summary: Use shorter versions of class names
Summary: Use shorter versions of class names
License: GPL+ or Artistic
License: GPL+ or Artistic
Group: Development/Libraries
Group: Development/Libraries
URL: http://search.cpan.org/dist/aliased/
URL: http://search.cpan.org/dist/aliased/
Source0: http://search.cpan.org/CPAN/authors/id/O/OV/OVID/aliased-%{version}.tar.gz
Source0: http://search.cpan.org/CPAN/authors/id/O/OV/OVID/aliased-%{version}.tar.gz
Patch0: aliased-0.31-old-Test::More.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch: noarch
BuildArch: noarch
BuildRequires: perl(Exporter)
BuildRequires: perl(Exporter)
BuildRequires: perl(lib)
BuildRequires: perl(Module::Build)
BuildRequires: perl(Module::Build)
BuildRequires: perl(Test::More)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod::Coverage)
BuildRequires: perl(Test::Pod::Coverage)
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
@ -24,6 +30,11 @@ subroutine is the last part of the class name.
%prep
%prep
%setup -q -n aliased-%{version}
%setup -q -n aliased-%{version}
# We need to patch the test suite if we have an old version of Test::More
%if %{old_test_more}
%patch0
%endif
%build
%build
perl Build.PL installdirs=vendor
perl Build.PL installdirs=vendor
./Build
./Build
@ -31,22 +42,32 @@ perl Build.PL installdirs=vendor
%install
%install
rm -rf %{buildroot}
rm -rf %{buildroot}
./Build install destdir=%{buildroot} create_packlist=0
./Build install destdir=%{buildroot} create_packlist=0
find %{buildroot} -depth -type d -exec rmdir {} \; 2>/dev/null
%{_fixperms} %{buildroot}
%{_fixperms} %{buildroot}
%check
%check
./Build test
./Build test
./Build test --test_files="xt/author/*.t"
%clean
%clean
rm -rf %{buildroot}
rm -rf %{buildroot}
%files
%files
%defattr(-,root,root,-)
%doc Changes README
%doc Changes README
%{perl_vendorlib}/aliased.pm
%{perl_vendorlib}/aliased.pm
%{_mandir}/man3/aliased.3pm*
%{_mandir}/man3/aliased.3pm*
%changelog
%changelog
* Tue Feb 19 2013 Paul Howarth <paul@city-fan.org> - 0.31-1
- Update to 0.31
- Added prefix() function (CPAN RT#48289)
- Moved Test::More to build_requires (CPAN RT#48926)
- Moved author tests to xt/author
- Explicitly run the author tests
- BR: perl(lib) and perl(Test::More) for the test suite
- Add patch to support building with Test::More < 0.88
- Drop %%defattr, redundant since rpm 4.4
- Don't need to remove empty directories from the buildroot
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.30-11
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.30-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild