1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
use 5.008;
use ExtUtils::MakeMaker;
if ($^O =~ /MSWin|cygwin/i) {
warn <<EOW;
Only a minor subset of the functionality of Net::OpenSSH is supported on Windows.
It is OK to install it as a dependency of Net::SSH::Any though.
EOW
}
my $ssh_V = `ssh -V 2>&1`;
if (defined $ssh_V) {
chomp $ssh_V;
if (my ($ver, $rev) = $ssh_V =~ /^openssh_(\d+)\.(\d+)/i) {
if ($ver < 4 or ($ver == 4 and $rev < 1)) {
warn <<EOW;
The OpenSSH client I have found in the PATH is too old ($ver.$rev)!
Version 4.1 is required and 5.2 recommended.
Continuing anyway...
EOW
}
}
else {
warn <<EOW;
The SSH client I have found in the PATH does not seem to be OpenSSH!
SSH client version: $ssh_V
Continuing anyway...
EOW
}
}
else {
warn <<EOW;
No SSH client is available from your PATH!
Continuing anyway...
EOW
}
WriteMakefile( NAME => 'Net::OpenSSH',
VERSION_FROM => 'lib/Net/OpenSSH.pm',
ABSTRACT_FROM => 'lib/Net/OpenSSH.pm',
LICENSE => 'perl_5',
PREREQ_PM => { Test::More => 0, },
AUTHOR => 'Salvador Fandino <sfandino@yahoo.com>',
META_MERGE => {
resources => {
repository => 'https://github.com/salva/p5-Net-OpenSSH',
},
},
);
|