2011-01-24 00:38:01 -08:00
|
|
|
use strict;
|
|
|
|
|
use warnings;
|
2011-01-23 20:12:36 -08:00
|
|
|
use ExtUtils::MakeMaker;
|
2011-01-24 00:38:01 -08:00
|
|
|
|
2011-10-16 11:46:08 -07:00
|
|
|
sub parseversion
|
|
|
|
|
{
|
2012-09-11 11:17:12 -07:00
|
|
|
# grab the version number from the changelog. I look for lines line
|
2011-10-23 14:53:53 -07:00
|
|
|
#
|
2012-09-11 11:17:12 -07:00
|
|
|
# libpackage-perl (0.02)
|
2011-10-23 14:53:53 -07:00
|
|
|
#
|
|
|
|
|
# I parse out the 0.02 part
|
2012-09-11 11:17:12 -07:00
|
|
|
open DCH, 'Changes' or die "Couldn't open 'Changes'";
|
2011-11-11 00:12:35 -08:00
|
|
|
my ($version) = <DCH> =~ /^\S+ \s* \( ([0-9\.]+) \)/x
|
2012-09-11 11:17:12 -07:00
|
|
|
or die "Couldn't parse version from 'Changes'";
|
2011-10-16 11:46:08 -07:00
|
|
|
close DCH;
|
|
|
|
|
|
|
|
|
|
return $version;
|
|
|
|
|
}
|
2011-06-11 23:02:22 -07:00
|
|
|
|
|
|
|
|
sub MY::libscan
|
|
|
|
|
{
|
|
|
|
|
package MY;
|
|
|
|
|
|
|
|
|
|
my ($self, $file) = @_;
|
|
|
|
|
|
2012-08-31 11:30:24 -07:00
|
|
|
# Don't install any symlinks (i.e. README.pod)
|
|
|
|
|
return undef if -l $file;
|
2011-06-11 23:02:22 -07:00
|
|
|
|
|
|
|
|
return $self->SUPER::libscan ($file);
|
|
|
|
|
}
|
|
|
|
|
|
2012-09-10 18:55:53 -07:00
|
|
|
# I want my manpage to go into the man section '1', NOT '1p'. Here I add a
|
|
|
|
|
# snippet to the end of the generated Makefile to force this
|
|
|
|
|
sub MY::postamble
|
|
|
|
|
{
|
|
|
|
|
return "MAN1EXT := 1\n";
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-31 11:30:24 -07:00
|
|
|
|
2011-01-23 20:12:36 -08:00
|
|
|
WriteMakefile
|
2011-01-24 00:38:01 -08:00
|
|
|
(
|
2011-10-16 11:17:18 -07:00
|
|
|
NAME => 'feedgnuplot',
|
2011-10-16 11:46:37 -07:00
|
|
|
AUTHOR => q{Dima Kogan <dima@secretsauce.net>},
|
2011-10-16 11:46:08 -07:00
|
|
|
VERSION => parseversion(),
|
2012-08-31 11:30:24 -07:00
|
|
|
ABSTRACT_FROM => 'bin/feedgnuplot.pod',
|
2011-01-24 00:38:01 -08:00
|
|
|
($ExtUtils::MakeMaker::VERSION >= 6.3002
|
|
|
|
|
? ('LICENSE' => 'perl')
|
|
|
|
|
: ()),
|
|
|
|
|
PL_FILES => {},
|
2011-10-16 11:17:18 -07:00
|
|
|
EXE_FILES => [ 'bin/feedgnuplot' ],
|
2012-08-31 11:30:24 -07:00
|
|
|
MAN1PODS => { 'bin/feedgnuplot.pod' => 'blib/man1/feedgnuplot.1' },
|
2011-02-06 15:54:18 -08:00
|
|
|
PREREQ_PM => { 'Test::Script::Run' => 0},
|
2011-01-24 00:38:01 -08:00
|
|
|
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
|
2011-10-16 11:17:18 -07:00
|
|
|
clean => { FILES => 'feedgnuplot-*' },
|
2011-01-24 00:38:01 -08:00
|
|
|
);
|