diff --git a/Makefile.PL b/Makefile.PL index b434ccd..f1d5d2e 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -2,6 +2,16 @@ use strict; use warnings; use ExtUtils::MakeMaker; +sub parseversion +{ +# grab the version number from the debian changelog file + open DCH, 'debian/changelog' or die "Couldn't open debian/changelog"; + my ($version) = =~ /feedgnuplot \s* \( ([0-9\.]+) - \w+ \)/x + or die "Couldn't parse version from debian/changelog"; + close DCH; + + return $version; +} sub MY::libscan { @@ -19,7 +29,7 @@ WriteMakefile ( NAME => 'feedgnuplot', AUTHOR => q{Dima Kogan }, - VERSION_FROM => 'bin/feedgnuplot', + VERSION => parseversion(), ABSTRACT_FROM => 'bin/feedgnuplot', ($ExtUtils::MakeMaker::VERSION >= 6.3002 ? ('LICENSE' => 'perl') diff --git a/bin/feedgnuplot b/bin/feedgnuplot index 16e3103..66e1a5c 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -12,9 +12,6 @@ use threads::shared; use Thread::Queue; use Pod::Usage; - -our $VERSION = '1.14'; - my %options; interpretCommandline(\%options);