From 2eda1122bb371ca60e2ad29b07522d4278300a49 Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Dec 15 2021 08:36:02 +0000 Subject: Add conditional for EPEL build --- diff --git a/Crypt-DH-GMP-0.00012-Fix-building-on-Perl-with-bundled-library.patch b/Crypt-DH-GMP-0.00012-Fix-building-on-Perl-with-bundled-library.patch new file mode 100644 index 0000000..eddbbe8 --- /dev/null +++ b/Crypt-DH-GMP-0.00012-Fix-building-on-Perl-with-bundled-library.patch @@ -0,0 +1,9 @@ +diff -up Crypt-DH-GMP-0.00012/Makefile.PL.orig Crypt-DH-GMP-0.00012/Makefile.PL +--- Crypt-DH-GMP-0.00012/Makefile.PL.orig 2019-10-16 11:39:34.570106082 +0200 ++++ Crypt-DH-GMP-0.00012/Makefile.PL 2019-10-16 11:41:10.286777085 +0200 +@@ -1,3 +1,5 @@ ++use lib '.'; ++ + use inc::Module::Install; + + my @DEFINES; diff --git a/perl-Crypt-DH-GMP.spec b/perl-Crypt-DH-GMP.spec index 3efe26f..e12565d 100644 --- a/perl-Crypt-DH-GMP.spec +++ b/perl-Crypt-DH-GMP.spec @@ -1,10 +1,11 @@ Name: perl-Crypt-DH-GMP Version: 0.00012 -Release: 23%{?dist} +Release: 24%{?dist} Summary: Crypt::DH Using GMP Directly License: GPL+ or Artistic URL: https://metacpan.org/release/Crypt-DH-GMP Source0: https://cpan.metacpan.org/authors/id/D/DM/DMAKI/Crypt-DH-GMP-%{version}.tar.gz +Patch0: Crypt-DH-GMP-0.00012-Fix-building-on-Perl-with-bundled-library.patch BuildRequires: coreutils BuildRequires: findutils BuildRequires: gmp-devel @@ -12,12 +13,21 @@ BuildRequires: make BuildRequires: perl-devel BuildRequires: perl-generators BuildRequires: perl-interpreter +%if ! (0%{?rhel}) BuildRequires: perl(inc::Module::Install) BuildRequires: perl(Module::Install::AuthorTests) BuildRequires: perl(Module::Install::Metadata) BuildRequires: perl(Module::Install::WriteAll) BuildRequires: perl(Module::Install::XSUtil) -BuildRequires: sed +%else +BuildRequires: gcc +BuildRequires: perl(Cwd) +BuildRequires: perl(Devel::CheckLib) +BuildRequires: perl(ExtUtils::MM_Unix) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Path) +BuildRequires: perl(FindBin) +%endif # Run-time BuildRequires: perl(strict) BuildRequires: perl(vars) @@ -41,9 +51,14 @@ implemented mostly in C. %prep %setup -q -n Crypt-DH-GMP-%{version} + +%if ! (0%{?rhel}) # Remove bundled libraries rm -r inc -sed -i -e '/^inc\// d' MANIFEST +perl -i -ne 'print $_ unless m{^inc/}' MANIFEST +%else +%patch0 -p1 +%endif %build perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS" NO_PACKLIST=1 NO_PERLLOCAL=1 @@ -64,6 +79,9 @@ make test %{_mandir}/man3/* %changelog +* Wed Dec 15 2021 Jitka Plesnikova - 0.00012-24 +- Add conditional for EPEL build + * Thu Jul 22 2021 Fedora Release Engineering - 0.00012-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild