aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2010-11-11 15:17:30 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2010-11-11 15:17:30 +0000
commit103b33e21ffe528c39771e345eb06438c173e885 (patch)
treeb29ede813743d567eec91ed634ca390c99e3a99a
parent11c01e6284fd03b3a6d23c61f6eb25fb44ce97eb (diff)
downloadperl-URPM-103b33e21ffe528c39771e345eb06438c173e885.tar
perl-URPM-103b33e21ffe528c39771e345eb06438c173e885.tar.gz
perl-URPM-103b33e21ffe528c39771e345eb06438c173e885.tar.bz2
perl-URPM-103b33e21ffe528c39771e345eb06438c173e885.tar.xz
perl-URPM-103b33e21ffe528c39771e345eb06438c173e885.zip
do version detection though pkg-config
-rw-r--r--Makefile.PL8
1 files changed, 2 insertions, 6 deletions
diff --git a/Makefile.PL b/Makefile.PL
index 22eedc5..f592889 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -21,13 +21,9 @@ sub hexversion {
return int($major<<16) + int($minor<<8) + int($micro<<0)
}
-my $version = `LC_ALL=C $rpm_path --version`;
-# fix compiling with RCs:
-$version =~ s/(-.*)|(\.DEVEL)//;
-chomp $version;
-$version =~ s/(RPM version )|(rpm \(RPM\) )//;
+my $version = `pkg-config --modversion rpm`;
my $hversion = hexversion($version);
-$hversion ge hexversion("5.0") or die "Unable to build URPM with too old (or undetected) rpm version $version\n";
+$hversion ge hexversion("5.3") or die "Unable to build URPM with too old (or undetected) rpm version $version\n";
# to generate the ChangeLog depending on the checkout layout
my $commonusername = "../common/";