From ba8357865affb829f65b627207310a968f27cea6 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Sun, 16 Oct 2011 11:46:08 -0700 Subject: [PATCH] version number now comes from the debian/changelog --- Makefile.PL | 12 +++++++++++- bin/feedgnuplot | 3 --- 2 files changed, 11 insertions(+), 4 deletions(-) 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);