2009-12-19 17:20:33 +00:00
|
|
|
use strict;
|
|
|
|
use warnings;
|
2014-05-17 17:32:03 +01:00
|
|
|
use Cwd;
|
2009-12-19 17:20:33 +00:00
|
|
|
|
|
|
|
use Module::Build;
|
|
|
|
|
2015-09-21 21:02:44 +01:00
|
|
|
my %project_info = (
|
|
|
|
tracker => 'https://github.com/duncs/clusterssh/issues',
|
|
|
|
repository => 'http://github.com/duncs/clusterssh',
|
2015-11-03 21:14:19 +00:00
|
|
|
homepage => 'http://github.com/duncs/clusterssh/wiki',
|
2016-04-08 21:27:45 +01:00
|
|
|
ci => 'https://travis-ci.org/duncs/clusterssh',
|
2015-09-21 21:02:44 +01:00
|
|
|
);
|
|
|
|
|
2014-01-31 10:13:45 +00:00
|
|
|
my $class = Module::Build->subclass(
|
|
|
|
class => "Module::Build::Custom",
|
2015-11-03 21:14:19 +00:00
|
|
|
code => qq{
|
|
|
|
my \%project_info = (
|
|
|
|
tracker => '$project_info{tracker}',
|
|
|
|
homepage => '$project_info{homepage}',
|
|
|
|
repository => '$project_info{repository}',
|
2016-04-30 11:36:57 +01:00
|
|
|
ci => '$project_info{ci}',
|
2015-11-03 21:14:19 +00:00
|
|
|
);
|
|
|
|
} . q{
|
2014-11-18 21:01:01 +00:00
|
|
|
# don't check for errors; 'build_requires' should get this sorted
|
|
|
|
eval {
|
|
|
|
require File::Slurp;
|
|
|
|
require CPAN::Changes;
|
|
|
|
};
|
2014-05-17 17:32:03 +01:00
|
|
|
|
2014-01-31 10:13:45 +00:00
|
|
|
sub ACTION_email {
|
2014-01-31 18:30:37 +00:00
|
|
|
my ($self, @args) = @_;
|
|
|
|
|
|
|
|
# Make sure all tests pass first
|
|
|
|
$self->depends_on("test");
|
|
|
|
|
|
|
|
print "Use '--changes <N>' to define how many to output. Default: 1", $/;
|
|
|
|
my $change_count = $self->args('changes') || 1;
|
|
|
|
|
|
|
|
my @changes = CPAN::Changes->load( 'Changes' )->releases;
|
|
|
|
|
|
|
|
if($changes[-1]->date =~ m/^0000/) {
|
|
|
|
die '#' x 40, $/, ' ' x 3, "FATAL: 'Changes' date not updated",$/,'#' x 40, $/;
|
|
|
|
}
|
|
|
|
|
2014-07-09 20:59:36 +01:00
|
|
|
print $/;
|
|
|
|
print 'Subject: ClusterSSH ', $self->dist_version, ' release', $/;
|
2014-01-31 18:30:37 +00:00
|
|
|
print $/;
|
|
|
|
|
|
|
|
foreach my $change ( 1 .. $change_count ) {
|
|
|
|
print $changes[ 0 - $change]->serialize;
|
|
|
|
}
|
2014-01-31 10:13:45 +00:00
|
|
|
|
|
|
|
my $v=$self->dist_version;
|
|
|
|
|
2014-01-31 18:30:37 +00:00
|
|
|
print <<"EOF";
|
|
|
|
==========
|
2015-09-21 21:02:44 +01:00
|
|
|
Home page: $project_info{homepage},
|
|
|
|
Bug Reports and Issues: $project_info{tracker}
|
|
|
|
Project Repository: $project_info{repository}
|
2016-04-08 21:27:45 +01:00
|
|
|
Automated Testing: $project_info{ci}
|
2014-01-31 18:30:37 +00:00
|
|
|
CPAN release: http://search.cpan.org/~duncs/App-ClusterSSH-$v
|
|
|
|
SF release: http://sourceforge.net/projects/clusterssh/files/2.%20ClusterSSH%20Series%204/App-ClusterSSH-${v}.tar.gz/download
|
|
|
|
==========
|
|
|
|
EOF
|
2014-05-17 17:32:03 +01:00
|
|
|
return $self;
|
|
|
|
}
|
2014-01-31 10:13:45 +00:00
|
|
|
},
|
|
|
|
);
|
|
|
|
|
|
|
|
my $build = $class->new(
|
2010-03-25 09:45:09 +00:00
|
|
|
meta_merge => {
|
|
|
|
resources => {
|
2012-12-11 15:50:45 +00:00
|
|
|
Repository => [
|
2010-01-04 10:59:26 +00:00
|
|
|
'http://clusterssh.git.sourceforge.net/',
|
2015-09-21 21:02:44 +01:00
|
|
|
$project_info{repository},
|
2010-01-04 10:59:26 +00:00
|
|
|
],
|
2015-09-21 21:02:44 +01:00
|
|
|
bugtracker => $project_info{tracker},
|
|
|
|
homepage => $project_info{homepage},
|
2010-03-25 09:45:09 +00:00
|
|
|
},
|
2010-01-04 10:59:26 +00:00
|
|
|
},
|
2010-06-20 20:23:41 +01:00
|
|
|
module_name => 'App::ClusterSSH',
|
|
|
|
license => 'perl',
|
|
|
|
dist_author => q{Duncan Ferguson <duncan_j_ferguson@yahoo.co.uk>},
|
|
|
|
dist_version_from => 'lib/App/ClusterSSH.pm',
|
|
|
|
requires => {
|
2016-07-12 14:03:37 +02:00
|
|
|
'version' => '0',
|
|
|
|
'Tk' => '800.022',
|
|
|
|
'X11::Protocol' => '0.56',
|
2016-07-11 19:58:33 +02:00
|
|
|
'X11::Protocol::WM' => '0',
|
2016-07-12 14:03:37 +02:00
|
|
|
'Locale::Maketext' => 0,
|
|
|
|
'Exception::Class' => '1.31',
|
|
|
|
'Try::Tiny' => 0,
|
|
|
|
'Getopt::Long' => 0,
|
|
|
|
'File::Path' => 0,
|
|
|
|
'File::Glob' => 0,
|
2009-12-19 17:20:33 +00:00
|
|
|
},
|
2010-01-11 19:38:10 +00:00
|
|
|
build_requires => {
|
|
|
|
'Test::Pod::Coverage' => 0,
|
|
|
|
'Test::Pod' => 0,
|
2010-06-20 17:56:00 +01:00
|
|
|
'Test::Trap' => 0,
|
2011-07-09 09:00:24 +01:00
|
|
|
'Readonly' => 0,
|
2011-07-21 08:23:49 +01:00
|
|
|
'File::Which' => 0,
|
2011-07-25 18:23:07 +01:00
|
|
|
'File::Temp' => 0,
|
2011-12-09 08:37:23 +00:00
|
|
|
'Test::DistManifest' => 0,
|
2012-11-26 21:42:06 +00:00
|
|
|
'Test::Differences' => 0,
|
2014-01-31 18:30:37 +00:00
|
|
|
'CPAN::Changes' => 0.27,
|
2014-05-17 17:32:03 +01:00
|
|
|
'File::Slurp' => 0,
|
2014-09-19 23:33:08 +01:00
|
|
|
'Test::PerlTidy' => 0,
|
2010-01-11 19:38:10 +00:00
|
|
|
},
|
2015-09-30 18:03:05 +01:00
|
|
|
recommends => { 'Sort::Naturally' => 0, },
|
|
|
|
configure_requires => { 'Module::Build' => 0, },
|
2010-06-20 20:23:41 +01:00
|
|
|
add_to_cleanup => ['App-ClusterSSH-*'],
|
|
|
|
create_makefile_pl => 'traditional',
|
2016-02-13 08:49:41 +00:00
|
|
|
script_files => [
|
|
|
|
'bin/cssh', 'bin/csftp',
|
|
|
|
'bin/ccon', 'bin/crsh',
|
|
|
|
'bin/ctel', 'bin/clusterssh_bash_completion.dist'
|
|
|
|
],
|
|
|
|
get_options => { changes => { type => '=s' }, },
|
|
|
|
PL_files => {
|
|
|
|
'bin_PL/_build_docs' => [
|
|
|
|
'bin/cssh', 'bin/csftp',
|
|
|
|
'bin/ccon', 'bin/crsh',
|
|
|
|
'bin/ctel', 'bin/clusterssh_bash_completion.dist'
|
|
|
|
],
|
|
|
|
},
|
2009-12-19 17:20:33 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
$build->create_build_script;
|