Makefile.PL gets the version from the Changes file, not debian/changelog

This commit is contained in:
Dima Kogan 2012-09-11 11:17:12 -07:00
parent 55ba185ec5
commit 265062904f

View File

@ -4,14 +4,14 @@ use ExtUtils::MakeMaker;
sub parseversion sub parseversion
{ {
# grab the version number from the debian changelog file. I look for lines line # grab the version number from the changelog. I look for lines line
# #
# libpackage-perl (0.02) unstable; urgency=low # libpackage-perl (0.02)
# #
# I parse out the 0.02 part # I parse out the 0.02 part
open DCH, 'debian/changelog' or die "Couldn't open debian/changelog"; open DCH, 'Changes' or die "Couldn't open 'Changes'";
my ($version) = <DCH> =~ /^\S+ \s* \( ([0-9\.]+) \)/x my ($version) = <DCH> =~ /^\S+ \s* \( ([0-9\.]+) \)/x
or die "Couldn't parse version from debian/changelog"; or die "Couldn't parse version from 'Changes'";
close DCH; close DCH;
return $version; return $version;