# Provides/Requires filtering is different from rpm 4.9 onwards %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) # Run extra test #%if ! (0%{?rhel}) #%bcond_without perl_Sub_Exporter_enables_extra_test #%else #%bcond_with perl_Sub_Exporter_enables_extra_test #%endif Name: perl-Sub-Exporter Version: 0.987 Release: 1%{?dist} Summary: Sophisticated exporter for custom-built routines License: GPL+ or Artistic URL: https://metacpan.org/release/Sub-Exporter Source0: http://cpan.metacpan.org/authors/id/R/RJ/RJBS/Sub-Exporter-%{version}.tar.gz BuildArch: noarch # Build BuildRequires: coreutils BuildRequires: findutils BuildRequires: make BuildRequires: perl-generators #BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) >= 6.30 # Module BuildRequires: perl(Carp) BuildRequires: perl(Data::OptList) >= 0.1 BuildRequires: perl(Package::Generator) BuildRequires: perl(Params::Util) >= 0.14 #BuildRequires: perl(Sub::Iperl-Sub-Exporter.specnstall) >= 0.92 # Test suite #BuildRequires: perl(base) #BuildRequires: perl(Exporter) #BuildRequires: perl(File::Spec) #BuildRequires: perl(IO::Handle) #BuildRequires: perl(IPC::Open3) #BuildRequires: perl(lib) #BuildRequires: perl(subs) #BuildRequires: perl(Test::More) >= 0.94 # Extra tests #%if %{with perl_Sub_Exporter_enables_extra_test} #BuildRequires: perl(Test::Pod) >= 1.41 #%endif # Runtime Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(Package::Generator) # Don't want doc-file provides or dependencies %global our_docdir %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} %global __provides_exclude_from ^%{our_docdir}/ %global __requires_exclude_from ^%{our_docdir}/ %description Sub::Exporter provides a sophisticated alternative to Exporter.pm. It allows for renaming, currying/sub-generation, and other cool stuff. ACHTUNG! If you're not familiar with Exporter or exporting, read Sub::Exporter::Tutorial first! %prep %setup -q -n Sub-Exporter-%{version} # Fix shellbangs find t/ -type f -exec \ perl -MExtUtils::MakeMaker -e 'ExtUtils::MM_Unix->fixin(qw{{}})' \; # Filter bogus provides/requires if we don't have rpm ≥ 4.9 %if ! %{rpm49} %global provfilt /bin/sh -c "%{__perl_provides} | grep -Ev '^perl[(]Test::SubExporter.*[)]'" %global __perl_provides %{provfilt} %global reqfilt /bin/sh -c "%{__perl_requires} | grep -Ev '^perl[(](base|Test::SubExporter.*)[)]'" %global __perl_requires %{reqfilt} %endif %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} make manifypods %install make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -delete %{_fixperms} -c %{buildroot} %check #make test #%if %{with perl_Sub_Exporter_enables_extra_test} #make test TEST_FILES="$(echo $(find xt/ -name '*.t'))" #%endif %files %doc Changes README t/ %dir %{perl_vendorlib}/Sub/ %dir %{perl_vendorlib}/Sub/Exporter/ %{perl_vendorlib}/Sub/Exporter.pm %{perl_vendorlib}/Sub/Exporter/Util.pm %doc %{perl_vendorlib}/Sub/Exporter/Cookbook.pod %doc %{perl_vendorlib}/Sub/Exporter/Tutorial.pod #%{_mandir}/man3/Sub::Exporter.3* #%{_mandir}/man3/Sub::Exporter::Cookbook.3* #%{_mandir}/man3/Sub::Exporter::Tutorial.3* #%{_mandir}/man3/Sub::Exporter::Util.3* %{_mandir}/man3/*.3* %changelog * Thu May 17 2018 Elbert Pol - 0.987-1 - initial rpm for OS2