diff --git a/cpanspec-1.78-Change-optimize-to-optflags.patch b/cpanspec-1.78-Change-optimize-to-optflags.patch new file mode 100644 index 0000000..cc726ba --- /dev/null +++ b/cpanspec-1.78-Change-optimize-to-optflags.patch @@ -0,0 +1,29 @@ +From b0bdaf235941165e74d5db24a9f87fdb4bcf57ce Mon Sep 17 00:00:00 2001 +From: Gavin Carr +Date: Tue, 8 Feb 2011 16:40:02 +0000 +Subject: [PATCH] Change %{optimize} to %{optflags}. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Šabata +--- + cpanspec | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cpanspec b/cpanspec +index 5eaa63d..7b697ff 100755 +--- a/cpanspec ++++ b/cpanspec +@@ -265,7 +265,7 @@ my @MACROS = ( + + # 1 is for the macros. + { +- 'optimize' => '%{optimize}', ++ 'optimize' => '%{optflags}', + 'buildroot' => '%{buildroot}', + }, + ); +-- +1.9.3 + diff --git a/cpanspec-1.78-Strip-any-version-comparison-operator-from-the-perl-BR.patch b/cpanspec-1.78-Strip-any-version-comparison-operator-from-the-perl-BR.patch new file mode 100644 index 0000000..ece4ea2 --- /dev/null +++ b/cpanspec-1.78-Strip-any-version-comparison-operator-from-the-perl-BR.patch @@ -0,0 +1,33 @@ +From c406955800472398c0105c72f46ba5b73ade5597 Mon Sep 17 00:00:00 2001 +From: Dennis Kaarsemaker +Date: Fri, 19 Aug 2011 08:23:50 +0200 +Subject: [PATCH] Strip any version comparison operator from the 'perl' build + requirement +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Because cpanspec does things with the epoch, and already adds version +comparison operators itself, they should be stripped from whatever +META.yml specifies so cpanspec does not generate invalid spec files. + +Signed-off-by: Petr Šabata +--- + cpanspec | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cpanspec b/cpanspec +index 8e9334a..f7fc1fc 100755 +--- a/cpanspec ++++ b/cpanspec +@@ -1015,6 +1015,7 @@ END + } + + if (defined($build_requires{perl})) { ++ $build_requires{perl} =~ s/^[<>=]+ *//; + printf $spec "%-16s%s >= %s\n", "BuildRequires:", "perl", + (($build_requires{perl} lt "5.6.0" ? "0:" : "1:") + . $build_requires{perl}) if $build_requires{perl}; +-- +1.9.3 + diff --git a/cpanspec.spec b/cpanspec.spec index ca9282e..12fd746 100644 --- a/cpanspec.spec +++ b/cpanspec.spec @@ -1,11 +1,13 @@ Name: cpanspec Version: 1.78 -Release: 17%{?dist} +Release: 18%{?dist} Summary: RPM spec file generation utility License: GPL+ or Artistic Group: Development/Tools URL: http://cpanspec.sourceforge.net/ Source0: http://sourceforge.net/downloads/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz +Patch0: %{name}-1.78-Change-optimize-to-optflags.patch +Patch1: %{name}-1.78-Strip-any-version-comparison-operator-from-the-perl-BR.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: perl(Module::Build) @@ -24,6 +26,8 @@ contained in the spec file is correct. %prep %setup -q +%patch0 -p1 +%patch1 -p1 %build %{__perl} Build.PL installdirs=vendor @@ -53,6 +57,10 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/* %changelog +* Thu Nov 06 2014 Petr Šabata - 1.78-18 +- Use %%{optflags} instead of %%{optimize} (#739461, b0bdaf23) +- Strip META perl version BR (#708377, c4069558) + * Tue Aug 26 2014 Jitka Plesnikova - 1.78-17 - Perl 5.20 rebuild