Blob Blame History Raw
# 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-Data-Section-Simple
Version:	0.05
Release:	1%{?dist}
Summary:	Read data from __DATA__
License:	GPL+ or Artistic
Group:		Development/Libraries
URL:		https://github.com/miyagawa/Data-Section-Simple
Source0:	http://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/Data-Section-Simple-%{version}.tar.gz
Patch1:		Data-Section-Simple-0.04-old-Test::More.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch:	noarch
# Build
BuildRequires:	perl(ExtUtils::MakeMaker)
# Module
BuildRequires:	perl(base)
BuildRequires:	perl(Exporter)
# Test Suite
BuildRequires:	perl(lib)
BuildRequires:	perl(Test::More)
BuildRequires:	perl(Test::Pod)
# Runtime
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))

%description
Data::Section::Simple is a simple module to extract data from the __DATA__
section of the file.

%prep
%setup -q -n Data-Section-Simple-%{version}

# Hack for old Test::More versions
%if %{old_test_more}
%patch1 -p1
%endif

%build
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
%{_fixperms} %{buildroot}

%check
make test RELEASE_TESTING=1

%clean
rm -rf %{buildroot}

%files
%doc Changes LICENSE README
%{perl_vendorlib}/Data/
%{_mandir}/man3/Data::Section::Simple.3pm*

%changelog
* Tue Jun 11 2013 Paul Howarth <paul@city-fan.org> - 0.05-1
- Update to 0.05
  - Use MakeMaker
- Revert to ExtUtils::MakeMaker flow
- Drop Test::Pod version requirement for EPEL build compatibility

* Mon May 20 2013 Paul Howarth <paul@city-fan.org> - 0.04-2
- Use Module::Build::Tiny's new --create_packlist option

* Fri Mar 29 2013 Paul Howarth <paul@city-fan.org> - 0.04-1
- Update to 0.04
  - Do not throw exceptions when there's no template
    (https://github.com/miyagawa/Data-Section-Simple/pull/2)
- URL moved to github
- Source0 moved to MetaCPAN
- Package upstream's new LICENSE file
- Switch to Module::Build::Tiny flow
- Update patch for building with Test::More < 0.88
- Drop %%defattr, redundant since rpm 4.4

* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.03-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.03-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue Jun 12 2012 Petr Pisar <ppisar@redhat.com> - 0.03-3
- Perl 5.16 rebuild

* Wed Jan 11 2012 Paul Howarth <paul@city-fan.org> - 0.03-2
- Fedora 17 mass rebuild

* Mon Sep 19 2011 Paul Howarth <paul@city-fan.org> - 0.03-1
- Update to 0.03
  - Noted the use of utf8 pragma
  - Doc typo fixes (Util)

* Thu Aug  4 2011 Paul Howarth <paul@city-fan.org> - 0.02-2
- Sanitize for Fedora submission

* Wed Aug  3 2011 Paul Howarth <paul@city-fan.org> - 0.02-1
- Initial RPM version