source: projects/specs/trunk/p/perl-Data-Section-Simple/perl-Data-Section-Simple-vl.spec @ 5859

Revision 5859, 2.1 KB checked in by shaolin, 12 years ago (diff)
  • new packages
Line 
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
4Name:           perl-Data-Section-Simple
5Version:        0.03
6Release:        1%{?_dist_release}
7Summary:        Read data from __DATA__
8License:        GPL+ or Artistic
9Group:          Development/Libraries
10URL:            http://search.cpan.org/dist/Data-Section-Simple/
11Source0:        http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/Data-Section-Simple-%{version}.tar.gz
12Patch1:         Data-Section-Simple-0.02-old-Test::More.patch
13BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
14BuildArch:      noarch
15BuildRequires:  perl(ExtUtils::MakeMaker)
16BuildRequires:  perl(Test::More)
17BuildRequires:  perl(Test::Pod) >= 1.00
18Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
19
20%description
21Data::Section::Simple is a simple module to extract data from the __DATA__
22section 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)
35perl Makefile.PL INSTALLDIRS=vendor
36make %{?_smp_mflags}
37
38%install
39rm -rf %{buildroot}
40make pure_install PERL_INSTALL_ROOT=%{buildroot}
41find %{buildroot} -type f -name .packlist -exec rm -f {} \;
42find %{buildroot} -depth -type d -exec rmdir {} \; 2>/dev/null
43%{_fixperms} %{buildroot}
44
45%check
46make test
47make test TEST_FILES="xt/*.t"
48
49%clean
50rm -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
Note: See TracBrowser for help on using the repository browser.