Don't use %define

This commit is contained in:
Paul Howarth 2016-01-07 11:03:38 +00:00
parent e67bbf39fe
commit c9e89e6ea5

View File

@ -2,9 +2,12 @@
%global quite_old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.94) ? 1 : 0);' 2>/dev/null || echo 0)
%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0)
# 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')
Name: perl-Sub-Exporter
Version: 0.987
Release: 6%{?dist}
Release: 7%{?dist}
Summary: Sophisticated exporter for custom-built routines
License: GPL+ or Artistic
Group: Development/Libraries
@ -15,8 +18,11 @@ Patch1: Sub-Exporter-0.987-tm088.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch: noarch
# Build
BuildRequires: perl
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: make
BuildRequires: perl
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.30
# Module
BuildRequires: perl(Carp)
BuildRequires: perl(Data::OptList) >= 0.1
@ -66,10 +72,12 @@ 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.*[)]'"
%define __perl_provides %{provfilt}
%global __perl_provides %{provfilt}
%global reqfilt /bin/sh -c "%{__perl_requires} | grep -Ev '^perl[(](base|Test::SubExporter.*)[)]'"
%define __perl_requires %{reqfilt}
%global __perl_requires %{reqfilt}
%endif
%build
perl Makefile.PL INSTALLDIRS=vendor
@ -96,12 +104,15 @@ rm -rf %{buildroot}
%{perl_vendorlib}/Sub/Exporter/Util.pm
%doc %{perl_vendorlib}/Sub/Exporter/Cookbook.pod
%doc %{perl_vendorlib}/Sub/Exporter/Tutorial.pod
%{_mandir}/man3/Sub::Exporter.3pm*
%{_mandir}/man3/Sub::Exporter::Cookbook.3pm*
%{_mandir}/man3/Sub::Exporter::Tutorial.3pm*
%{_mandir}/man3/Sub::Exporter::Util.3pm*
%{_mandir}/man3/Sub::Exporter.3*
%{_mandir}/man3/Sub::Exporter::Cookbook.3*
%{_mandir}/man3/Sub::Exporter::Tutorial.3*
%{_mandir}/man3/Sub::Exporter::Util.3*
%changelog
* Thu Jan 7 2016 Paul Howarth <paul@city-fan.org> - 0.987-7
- Don't use %%define
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.987-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild