root/trunk/plagger/Makefile.PL

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

fixed order of plugin dependencies check to prioritize default plugin, otherwise alphabetically

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.20);
33 requires('Encode', 2.10);
34 requires('Term::Encoding');
35 requires('File::HomeDir');
36
37 build_requires('YAML');
38 include_deps('YAML');
39
40 build_requires('Test::More', 0.42);
41 build_requires('Test::Base', 0.52);
42
43 features(
44     'Better Encoding detection' => [
45         -default => 0,
46         recommends('Encode::Detect'),
47     ],
48     'POD Testing' => [
49         -default => 0,
50         recommends('Test::Pod'),
51         recommends('Test::Pod::Coverage'),
52     ],
53     'Cookie sharing with Firefox' => [
54         -default => 0,
55         recommends('HTTP::Cookies::Mozilla'),
56     ],
57     'Liberal XML parsing' => [
58         -default => 1,
59         recommends('XML::Liberal', 0.14),
60         recommends('XML::RSS::Liberal'),
61     ],
62     'XPath support in Subscription and Feed Upgrader' => [
63         -default => 1,
64         recommends('HTML::TreeBuilder::XPath'),
65     ],
66 );
67
68 require YAML;
69 require DirHandle;
70 require File::Spec;
71
72 my $dh = DirHandle->new("deps");
73 my @plugins;
74 while (my $f = $dh->read) {
75     next unless $f =~ /\.yaml$/;
76     my $meta = YAML::LoadFile( File::Spec->catfile("deps", $f) );
77     push @plugins, $meta if !$meta->{platform} || $meta->{platform} eq $^O;
78 }
79
80 for my $meta (sort { $b->{default} <=> $a->{default} || $a->{name} cmp $b->{name} } @plugins) {
81     features(
82         $meta->{name}, [
83             -default => $meta->{default},
84             map recommends($_ => $meta->{depends}->{$_}), keys %{$meta->{depends} || {}},
85         ],
86     );
87 }
88
89 tests 't/*.t t/*/*.t t/*/*/*.t';
90
91 use_test_base;
92
93 auto_include;
94 auto_install;
95
96 install_script('plagger');
97 install_script('bin/plagger-ircbot');
98 WriteAll;
Note: See TracBrowser for help on using the browser.