source: spec/trunk/SPECS/perl-Sub-Exporter.spec@ 1567

Last change on this file since 1567 was 1409, checked in by tellie, 7 years ago

spec: perl-Sub-Exporter: Release version 0.987-1.

File size: 3.5 KB
Line 
1# Provides/Requires filtering is different from rpm 4.9 onwards
2%global rpm49 %(rpm --version | perl -p -e 's/^.* (\\d+)\\.(\\d+).*/sprintf("%d.%03d",$1,$2) ge 4.009 ? 1 : 0/e' 2>/dev/null || echo 0)
3
4# Run extra test
5#%if ! (0%{?rhel})
6#%bcond_without perl_Sub_Exporter_enables_extra_test
7#%else
8#%bcond_with perl_Sub_Exporter_enables_extra_test
9#%endif
10
11Name: perl-Sub-Exporter
12Version: 0.987
13Release: 1%{?dist}
14Summary: Sophisticated exporter for custom-built routines
15License: GPL+ or Artistic
16URL: https://metacpan.org/release/Sub-Exporter
17Source0: http://cpan.metacpan.org/authors/id/R/RJ/RJBS/Sub-Exporter-%{version}.tar.gz
18BuildArch: noarch
19# Build
20BuildRequires: coreutils
21BuildRequires: findutils
22BuildRequires: make
23BuildRequires: perl-generators
24#BuildRequires: perl-interpreter
25BuildRequires: perl(ExtUtils::MakeMaker) >= 6.30
26# Module
27BuildRequires: perl(Carp)
28BuildRequires: perl(Data::OptList) >= 0.1
29BuildRequires: perl(Package::Generator)
30BuildRequires: perl(Params::Util) >= 0.14
31#BuildRequires: perl(Sub::Iperl-Sub-Exporter.specnstall) >= 0.92
32# Test suite
33#BuildRequires: perl(base)
34#BuildRequires: perl(Exporter)
35#BuildRequires: perl(File::Spec)
36#BuildRequires: perl(IO::Handle)
37#BuildRequires: perl(IPC::Open3)
38#BuildRequires: perl(lib)
39#BuildRequires: perl(subs)
40#BuildRequires: perl(Test::More) >= 0.94
41# Extra tests
42#%if %{with perl_Sub_Exporter_enables_extra_test}
43#BuildRequires: perl(Test::Pod) >= 1.41
44#%endif
45# Runtime
46Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
47Requires: perl(Package::Generator)
48
49# Don't want doc-file provides or dependencies
50%global our_docdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
51%global __provides_exclude_from ^%{our_docdir}/
52%global __requires_exclude_from ^%{our_docdir}/
53
54%description
55Sub::Exporter provides a sophisticated alternative to Exporter.pm. It allows
56for renaming, currying/sub-generation, and other cool stuff.
57
58ACHTUNG! If you're not familiar with Exporter or exporting, read
59Sub::Exporter::Tutorial first!
60
61%prep
62%setup -q -n Sub-Exporter-%{version}
63
64# Fix shellbangs
65find t/ -type f -exec \
66 perl -MExtUtils::MakeMaker -e 'ExtUtils::MM_Unix->fixin(qw{{}})' \;
67
68# Filter bogus provides/requires if we don't have rpm ≥ 4.9
69%if ! %{rpm49}
70%global provfilt /bin/sh -c "%{__perl_provides} | grep -Ev '^perl[(]Test::SubExporter.*[)]'"
71%global __perl_provides %{provfilt}
72%global reqfilt /bin/sh -c "%{__perl_requires} | grep -Ev '^perl[(](base|Test::SubExporter.*)[)]'"
73%global __perl_requires %{reqfilt}
74%endif
75
76%build
77perl Makefile.PL INSTALLDIRS=vendor
78make %{?_smp_mflags}
79make manifypods
80
81%install
82make pure_install DESTDIR=%{buildroot}
83find %{buildroot} -type f -name .packlist -delete
84%{_fixperms} -c %{buildroot}
85
86%check
87#make test
88#%if %{with perl_Sub_Exporter_enables_extra_test}
89#make test TEST_FILES="$(echo $(find xt/ -name '*.t'))"
90#%endif
91
92%files
93%doc Changes README t/
94%dir %{perl_vendorlib}/Sub/
95%dir %{perl_vendorlib}/Sub/Exporter/
96%{perl_vendorlib}/Sub/Exporter.pm
97%{perl_vendorlib}/Sub/Exporter/Util.pm
98%doc %{perl_vendorlib}/Sub/Exporter/Cookbook.pod
99%doc %{perl_vendorlib}/Sub/Exporter/Tutorial.pod
100#%{_mandir}/man3/Sub::Exporter.3*
101#%{_mandir}/man3/Sub::Exporter::Cookbook.3*
102#%{_mandir}/man3/Sub::Exporter::Tutorial.3*
103#%{_mandir}/man3/Sub::Exporter::Util.3*
104%{_mandir}/man3/*.3*
105
106%changelog
107
108* Thu May 17 2018 Elbert Pol <elbert.pol@gmail.com> - 0.987-1
109- initial rpm for OS2
Note: See TracBrowser for help on using the repository browser.