[5859] | 1 | # We need to patch the test suite if we have an old version of Test::More |
---|
| 2 | %global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0) |
---|
| 3 | |
---|
| 4 | Name: perl-Data-Section-Simple |
---|
| 5 | Version: 0.03 |
---|
| 6 | Release: 1%{?_dist_release} |
---|
| 7 | Summary: Read data from __DATA__ |
---|
| 8 | License: GPL+ or Artistic |
---|
| 9 | Group: Development/Libraries |
---|
| 10 | URL: http://search.cpan.org/dist/Data-Section-Simple/ |
---|
| 11 | Source0: http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/Data-Section-Simple-%{version}.tar.gz |
---|
| 12 | Patch1: Data-Section-Simple-0.02-old-Test::More.patch |
---|
| 13 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu) |
---|
| 14 | BuildArch: noarch |
---|
| 15 | BuildRequires: perl(ExtUtils::MakeMaker) |
---|
| 16 | BuildRequires: perl(Test::More) |
---|
| 17 | BuildRequires: perl(Test::Pod) >= 1.00 |
---|
| 18 | Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) |
---|
| 19 | |
---|
| 20 | %description |
---|
| 21 | Data::Section::Simple is a simple module to extract data from the __DATA__ |
---|
| 22 | section of the file. |
---|
| 23 | |
---|
| 24 | %prep |
---|
| 25 | %setup -q -n Data-Section-Simple-%{version} |
---|
| 26 | |
---|
| 27 | # Hack for old Test::More versions |
---|
| 28 | %if %{old_test_more} |
---|
| 29 | %patch1 -p1 |
---|
| 30 | %endif |
---|
| 31 | |
---|
| 32 | %build |
---|
| 33 | # Note that the Makefile.PL complains about missing Test::Requires |
---|
| 34 | # but the package doesn't actually use it (CPAN RT#69981) |
---|
| 35 | perl Makefile.PL INSTALLDIRS=vendor |
---|
| 36 | make %{?_smp_mflags} |
---|
| 37 | |
---|
| 38 | %install |
---|
| 39 | rm -rf %{buildroot} |
---|
| 40 | make pure_install PERL_INSTALL_ROOT=%{buildroot} |
---|
| 41 | find %{buildroot} -type f -name .packlist -exec rm -f {} \; |
---|
| 42 | find %{buildroot} -depth -type d -exec rmdir {} \; 2>/dev/null |
---|
| 43 | %{_fixperms} %{buildroot} |
---|
| 44 | |
---|
| 45 | %check |
---|
| 46 | make test |
---|
| 47 | make test TEST_FILES="xt/*.t" |
---|
| 48 | |
---|
| 49 | %clean |
---|
| 50 | rm -rf %{buildroot} |
---|
| 51 | |
---|
| 52 | %files |
---|
| 53 | %defattr(-,root,root,-) |
---|
| 54 | %doc Changes README |
---|
| 55 | %{perl_vendorlib}/Data/ |
---|
| 56 | %{_mandir}/man3/Data::Section::Simple.3pm* |
---|
| 57 | |
---|
| 58 | %changelog |
---|
| 59 | * Thu Mar 08 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.03-1 |
---|
| 60 | - initial build for Vine Linux |
---|
| 61 | |
---|
| 62 | * Wed Jan 11 2012 Paul Howarth <paul@city-fan.org> - 0.03-2 |
---|
| 63 | - Fedora 17 mass rebuild |
---|
| 64 | |
---|
| 65 | * Mon Sep 19 2011 Paul Howarth <paul@city-fan.org> - 0.03-1 |
---|
| 66 | - Update to 0.03 |
---|
| 67 | - Noted the use of utf8 pragma |
---|
| 68 | - Doc typo fixes (Util) |
---|
| 69 | |
---|
| 70 | * Thu Aug 4 2011 Paul Howarth <paul@city-fan.org> - 0.02-2 |
---|
| 71 | - Sanitize for Fedora submission |
---|
| 72 | |
---|
| 73 | * Wed Aug 3 2011 Paul Howarth <paul@city-fan.org> - 0.02-1 |
---|
| 74 | - Initial RPM version |
---|