summaryrefslogtreecommitdiff
path: root/Makefile.PL
diff options
context:
space:
mode:
authorFlorian Schlichting <fschlich@zedat.fu-berlin.de>2012-02-22 22:32:16 +0100
committerFlorian Schlichting <fschlich@zedat.fu-berlin.de>2012-02-22 22:32:16 +0100
commit92f4e92ad208c352c84c30fcacfca98128f4e4b7 (patch)
tree31ce5acbe9c781184d47b4f2b418b91f1327f0c3 /Makefile.PL
Import original source of Net-OpenSSH 0.57
Diffstat (limited to 'Makefile.PL')
-rw-r--r--Makefile.PL37
1 files changed, 37 insertions, 0 deletions
diff --git a/Makefile.PL b/Makefile.PL
new file mode 100644
index 0000000..9434285
--- /dev/null
+++ b/Makefile.PL
@@ -0,0 +1,37 @@
+use 5.008;
+use ExtUtils::MakeMaker;
+
+$^O =~ /Win32/ and die "This module does not work on MS Windows.\nTry installing a real OS!\n";
+
+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',
+ PREREQ_PM => { Test::More => 0, },
+ AUTHOR => 'Salvador Fandino <sfandino@yahoo.com>' );