From 9051d2588fcaeccab68f5f74ae0e419fa21c9557 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 1 Nov 2017 01:11:09 +0100 Subject: advertize the proper pkg for most distros --- Makefile.PL | 4 +++- NEWS | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.PL b/Makefile.PL index 8263fb7..7530397 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -11,6 +11,7 @@ our %CONFIGURE_REQUIRES = ( 'ExtUtils::MakeMaker' => '6.64', 'ExtUtils::PkgConfig' => '1.00', # for finding rpm-devel ); +my $is_debian = -f '/etc/debian_version'; # Writing a fake Makefile ensures that CPAN will pick up the correct # dependencies and install them. @@ -29,7 +30,8 @@ unless (eval "use ExtUtils::Depends '$CONFIGURE_REQUIRES{'ExtUtils::Depends'}';" my %cfg; unless (eval { %cfg = ExtUtils::PkgConfig->find("rpm >= $build_reqs{rpm}"); 1 }) { - warn $@; + my $rpmdev_pkg = $is_debian ? "librpm-dev" : "rpm-devel"; + warn "*** Ensure that $rpmdev_pkg is installed\n" . $@; exit 0; } diff --git a/NEWS b/NEWS index 206fe04..5583e47 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ - cpan testers: o add cflags reported by pkgconfig (needed for eg: FreeBSD where rpm is installed under /usr/local) + o advertize the proper pkg for most distros Version 5.15 - 3 October 2017 -- cgit v1.2.1