~ubuntu-branches/ubuntu/trusty/libnet-openssh-perl/trusty

« back to all changes in this revision

Viewing changes to Makefile.PL

  • Committer: Package Import Robot
  • Author(s): Florian Schlichting
  • Date: 2012-02-22 23:35:55 UTC
  • Revision ID: package-import@ubuntu.com-20120222233555-j839vhem3058ewpx
Tags: upstream-0.57
ImportĀ upstreamĀ versionĀ 0.57

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
use 5.008;
 
2
use ExtUtils::MakeMaker;
 
3
 
 
4
$^O =~ /Win32/ and die "This module does not work on MS Windows.\nTry installing a real OS!\n";
 
5
 
 
6
my $ssh_V = `ssh -V 2>&1`;
 
7
if (defined $ssh_V) {
 
8
    chomp $ssh_V;
 
9
    if (my ($ver, $rev) = $ssh_V =~ /^openssh_(\d+)\.(\d+)/i) {
 
10
        if ($ver < 4 or ($ver == 4 and $rev < 1)) {
 
11
            warn <<EOW;
 
12
The OpenSSH client I have found in the PATH is too old ($ver.$rev)!
 
13
Version 4.1 is required and 5.2 recommended.
 
14
Continuing anyway...
 
15
EOW
 
16
        }
 
17
    }
 
18
    else {
 
19
        warn <<EOW;
 
20
The SSH client I have found in the PATH does not seem to be OpenSSH!
 
21
SSH client version: $ssh_V
 
22
Continuing anyway...
 
23
EOW
 
24
    }
 
25
}
 
26
else {
 
27
    warn <<EOW;
 
28
No SSH client is available from your PATH!
 
29
Continuing anyway...
 
30
EOW
 
31
}
 
32
 
 
33
WriteMakefile( NAME => 'Net::OpenSSH',
 
34
               VERSION_FROM => 'lib/Net/OpenSSH.pm',
 
35
               ABSTRACT_FROM => 'lib/Net/OpenSSH.pm',
 
36
               PREREQ_PM => { Test::More => 0, },
 
37
               AUTHOR => 'Salvador Fandino <sfandino@yahoo.com>' );