version parser now works for any package name

This commit is contained in:
Dima Kogan 2011-10-23 14:53:53 -07:00
parent 2b365dad30
commit 022682d45a

View File

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