diff options
Diffstat (limited to 'RPM4/Makefile.PL')
-rw-r--r-- | RPM4/Makefile.PL | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/RPM4/Makefile.PL b/RPM4/Makefile.PL index 48f1908..0f15e6e 100644 --- a/RPM4/Makefile.PL +++ b/RPM4/Makefile.PL @@ -5,9 +5,8 @@ use ExtUtils::MakeMaker; use Getopt::Long; #- require at least rpm 4.2 -my $rpm_version = `rpm --version`; -$rpm_version =~ s/RPM version //; -$rpm_version =~ /^(?:[5-9]|\d{2}|4\.[2-9])/ +my $rpm_version = `rpm --version` =~ /version ([0-9.]+)$/ ? version->new("v$1") : (); +$rpm_version ge 4.6.0 or die <<BARF; Unable to build RPM4 with too old (or undetected) rpm version $rpm_version BARF |