perl-Data-Section-Simple-vl.spec 2.1 KB

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