| 1 |
use ExtUtils::MakeMaker; |
| 2 |
|
| 3 |
my $mm = MM->new({ |
| 4 |
dist => { |
| 5 |
PREOP => 'pod2text lib/AnyEvent/MCP/Intro.pod | tee README >$(DISTVNAME)/README; chmod -R u=rwX,go=rX . ;', |
| 6 |
COMPRESS => 'gzip -9v', |
| 7 |
SUFFIX => '.gz', |
| 8 |
}, |
| 9 |
NAME => "AnyEvent::MCP", |
| 10 |
LICENSE => "perl_5", |
| 11 |
VERSION_FROM => "lib/AnyEvent/MCP.pm", |
| 12 |
EXE_FILES => [ |
| 13 |
"bin/anyevent-mcp", |
| 14 |
"bin/anyevent-mcp-askpermission", |
| 15 |
"bin/anyevent-mcp-form-elicitation", |
| 16 |
"bin/mcp-multibroker", |
| 17 |
"bin/mcp-fs", |
| 18 |
"bin/mcp-vim", |
| 19 |
"bin/mcp-webbrowser", |
| 20 |
"bin/mcp-ask-user", |
| 21 |
"bin/mcp-imap", |
| 22 |
"bin/mcp-http", |
| 23 |
], |
| 24 |
PREREQ_PM => { |
| 25 |
AnyEvent => 5.33, |
| 26 |
AnyEvent::HTTP => 0, |
| 27 |
common::sense => 3.3, |
| 28 |
parent => 0, |
| 29 |
JSON::XS => 3, |
| 30 |
Digest::SHA => 0, |
| 31 |
Scalar::Util => 0, |
| 32 |
MIME::Base64 => 0, |
| 33 |
Encode => 0, |
| 34 |
}, |
| 35 |
META_MERGE => { |
| 36 |
'meta-spec' => { version => 2 }, |
| 37 |
prereqs => { |
| 38 |
runtime => { recommends => { |
| 39 |
AnyEvent::WebSocket::Server => 0, |
| 40 |
AnyEvent::WebSocket::Message => 0, |
| 41 |
AnyEvent::Fork::RPC => 2.0, |
| 42 |
Mail::IMAPTalk => 4.07, |
| 43 |
IO::Socket::SSL => 0, |
| 44 |
Term::ReadKey => 0, |
| 45 |
} }, |
| 46 |
test => { recommends => { |
| 47 |
Protocol::WebSocket::Frame => 0, |
| 48 |
} }, |
| 49 |
}, |
| 50 |
}, |
| 51 |
TEST_REQUIRES => { |
| 52 |
Test::More => 0.88, |
| 53 |
Pod::Checker => 0, |
| 54 |
}, |
| 55 |
}); |
| 56 |
|
| 57 |
$mm->flush; |
| 58 |
|
| 59 |
package MY; |
| 60 |
sub test_via_harness { |
| 61 |
my ($self, $perl, $tests) = @_; |
| 62 |
|
| 63 |
# Keep errors visible, but not expected warnings or routine MCP activity. |
| 64 |
# An explicit PERL_ANYEVENT_LOG still takes precedence. |
| 65 |
# Use MakeMaker's built scripts, not installed programs or source shebangs. |
| 66 |
$self->SUPER::test_via_harness ( |
| 67 |
'PATH="`pwd`/$(INST_SCRIPT):$$PATH" ' |
| 68 |
. 'PERL_ANYEVENT_LOG="$${PERL_ANYEVENT_LOG:-filter=error log=error}" ' . $perl, |
| 69 |
$tests, |
| 70 |
) |
| 71 |
} |
| 72 |
|
| 73 |
package main; |
| 74 |
|
| 75 |
sub MY::postamble { |
| 76 |
<<'MAKE' |
| 77 |
dist: publish |
| 78 |
|
| 79 |
publish: publish_vim_plugin publish_webbrowser_userscript |
| 80 |
|
| 81 |
publish_vim_plugin: |
| 82 |
rsync -p --chmod=F644 vim/plugin/mcp-vim.vim dist.schmorp.de:/var/www/dist.schmorp.de/mcp-vim/1/. |
| 83 |
|
| 84 |
publish_webbrowser_userscript: |
| 85 |
rsync -p --chmod=F644 webbrowser/mcp-webbrowser.user.js dist.schmorp.de:/var/www/dist.schmorp.de/mcp-webbrowser/1/. |
| 86 |
|
| 87 |
MAKE |
| 88 |
} |
| 89 |
|