root/trunk/plagger/Makefile.PL

Revision 1741 (checked in by miyagawa, 14 years ago)

merge from hackathon-summary

Line 
1 use strict;
2 use inc::Module::Install;
3
4 name('Plagger');
5 all_from('lib/Plagger.pm');
6
7 requires('Class::Accessor::Fast');
8 requires('File::Find::Rule');
9 requires('UNIVERSAL::require' => 0.10);
10 requires('Template', 2.13);
11 requires('Template::Provider::Encoding' => 0.04);
12 requires('YAML' => 0.39);
13 requires('Text::Tags');
14 requires('DateTime' => 0.29);
15 requires('DateTime::Format::Mail');
16 requires('DateTime::Format::W3CDTF');
17 requires('DateTime::Format::Strptime');
18 requires('Digest::MD5');
19 requires('LWP');
20 requires('HTML::Parser' => 3.51);
21 requires('URI::Fetch' => 0.071);
22 requires('Cache::Cache' => 1.04);
23 requires('Module::Pluggable::Fast');
24 requires('HTML::ResolveLink');
25 requires('Date::Parse');
26 requires('MIME::Types', 1.16);
27 requires('Net::DNS');
28
29 requires('XML::Feed', 0.12);
30 requires('XML::LibXML');
31 requires('XML::Atom', 0.23);
32 requires('XML::RSS::LibXML', 0.23);
33 requires('Encode', 2.10);
34 requires('Term::Encoding');
35 requires('File::HomeDir');
36
37 build_requires('YAML');
38 build_requires('YAML::Loader');
39 include_deps('YAML');
40
41 build_requires('Test::More', 0.42);
42 build_requires('Test::Base', 0.52);
43
44 features(
45     'Better Encoding detection' => [
46         -default => 0,
47         recommends('Encode::Detect'),
48     ],
49     'POD Testing' => [
50         -default => 0,
51         recommends('Test::Pod'),
52         recommends('Test::Pod::Coverage'),
53     ],
54     'Cookie sharing with Firefox' => [
55         -default => 0,
56         recommends('HTTP::Cookies::Mozilla'),
57     ],
58     'Liberal XML parsing' => [
59         -default => 1,
60         recommends('XML::Liberal', 0.14),
61         recommends('XML::RSS::Liberal'),
62     ],
63     'XPath support in Subscription and Feed Upgrader' => [
64         -default => 1,
65         recommends('HTML::TreeBuilder::XPath'),
66     ],
67     'Better html to text formatter' => [
68         -default => 1,
69         recommends('HTML::TreeBuilder'),
70         recommends('HTML::FormatText'),
71     ],
72 );
73
74 require YAML;
75 require DirHandle;
76 require File::Spec;
77
78 my $dh = DirHandle->new("deps");
79 my @plugins;
80 while (my $f = $dh->read) {
81     next unless $f =~ /\.yaml$/;
82     my $meta = YAML::LoadFile( File::Spec->catfile("deps", $f) );
83     push @plugins, $meta if !$meta->{platform} || $meta->{platform} eq $^O;
84 }
85
86 for my $meta (sort { $b->{default} <=> $a->{default} || $a->{name} cmp $b->{name} } @plugins) {
87     features(
88         $meta->{name}, [
89             -default => $meta->{default},
90             map recommends($_ => $meta->{depends}->{$_}), keys %{$meta->{depends} || {}},
91         ],
92     );
93 }
94
95 tests 't/*.t t/*/*.t t/*/*/*.t';
96
97 use_test_base;
98
99 auto_include;
100 auto_install;
101
102 install_script('plagger');
103 install_script('bin/plagger-ircbot');
104 WriteAll;
Note: See TracBrowser for help on using the browser.