version number now comes from the debian/changelog

This commit is contained in:
Dima Kogan 2011-10-16 11:46:08 -07:00
parent 05ba0c4975
commit ba8357865a
2 changed files with 11 additions and 4 deletions

View File

@ -2,6 +2,16 @@ use strict;
use warnings; use warnings;
use ExtUtils::MakeMaker; 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) = <DCH> =~ /feedgnuplot \s* \( ([0-9\.]+) - \w+ \)/x
or die "Couldn't parse version from debian/changelog";
close DCH;
return $version;
}
sub MY::libscan sub MY::libscan
{ {
@ -19,7 +29,7 @@ WriteMakefile
( (
NAME => 'feedgnuplot', NAME => 'feedgnuplot',
AUTHOR => q{Dima Kogan <dkogan@cds.caltech.edu>}, AUTHOR => q{Dima Kogan <dkogan@cds.caltech.edu>},
VERSION_FROM => 'bin/feedgnuplot', VERSION => parseversion(),
ABSTRACT_FROM => 'bin/feedgnuplot', ABSTRACT_FROM => 'bin/feedgnuplot',
($ExtUtils::MakeMaker::VERSION >= 6.3002 ($ExtUtils::MakeMaker::VERSION >= 6.3002
? ('LICENSE' => 'perl') ? ('LICENSE' => 'perl')

View File

@ -12,9 +12,6 @@ use threads::shared;
use Thread::Queue; use Thread::Queue;
use Pod::Usage; use Pod::Usage;
our $VERSION = '1.14';
my %options; my %options;
interpretCommandline(\%options); interpretCommandline(\%options);