Login
Delete META.yml, MANIFEST, and README. Just have them
[gknop/Perl-Critic.git] / Build.PL
1 #######################################################################
2 #      $URL$
3 #     $Date$
4 #   $Author$
5 # $Revision$
6 ########################################################################
7
8 BEGIN {
9     use 5.006001;
10 }
11
12 use strict;
13 use warnings;
14
15 use lib 'inc';
16 use lib 't/tlib';
17
18 use Module::Build;
19
20 use Perl::Critic::BuildUtilities qw<
21     recommended_module_versions
22     test_wrappers_to_generate
23     get_PL_files
24     dump_unlisted_or_optional_module_versions
25     emit_tar_warning_if_necessary
26 >;
27
28 emit_tar_warning_if_necessary();
29
30
31 my $class = Module::Build->subclass( code => <<'END_SUBCLASS' );
32
33     sub ACTION_test {
34         my ($self) = @_;
35
36         $self->depends_on('manifest');
37
38         return $self->SUPER::ACTION_test();
39     } # end ACTION_distdir
40
41     sub ACTION_authortest {
42         my ($self) = @_;
43
44         $self->depends_on('build');
45         $self->depends_on('manifest');
46         $self->depends_on('distmeta');
47
48         $self->test_files( qw< t xt/author > );
49         $self->recursive_test_files(1);
50
51         $self->depends_on('test');
52
53         return;
54     } # end ACTION_authortest()
55
56     sub ACTION_distdir {
57         my ($self) = @_;
58
59         $self->depends_on('authortest');
60
61         return $self->SUPER::ACTION_distdir();
62     } # end ACTION_distdir
63
64 END_SUBCLASS
65
66 my $builder = $class->new(
67     module_name     => 'Perl::Critic',
68     dist_author     => 'Jeffrey Thalhammer <thaljef@cpan.org>',
69     dist_abstract   => 'Critique Perl source code for best-practices.',
70     license         => 'perl',
71     dynamic_config  => 1,
72     create_readme   => 1,
73     create_packlist => 1,
74     sign            => 0,
75
76     requires        => {
77         'B::Keywords'               => 1.05,
78         'Carp'                      => 0,
79         'Config::Tiny'              => 2,
80         'English'                   => 0,
81         'Exception::Class'          => 1.23,
82         'File::Basename'            => 0,
83         'File::Find'                => 0,
84         'File::Path'                => 0,
85         'File::Spec'                => 0,
86         'File::Spec::Unix'          => 0,
87         'File::Temp'                => 0,
88         'Getopt::Long'              => 0,
89         'IO::String'                => 0,
90         'List::MoreUtils'           => 0,
91         'List::Util'                => 0,
92         'Module::Pluggable'         => 3.1,
93         'PPI'                       => 1.203,
94         'PPI::Document'             => 1.203,
95         'PPI::Document::File'       => 1.203,
96         'PPI::Node'                 => 1.203,
97         'PPI::Token::Quote::Single' => 1.203,
98         'PPI::Token::Whitespace'    => 1.203,
99         'Pod::PlainText'            => 0,
100         'Pod::Select'               => 0,
101         'Pod::Usage'                => 0,
102         'Readonly'                  => 1.03,
103         'Scalar::Util'              => 0,
104         'String::Format'            => 1.13,
105         'base'                      => 0,
106         'charnames'                 => 0,
107         'overload'                  => 0,
108         'strict'                    => 0,
109         'version'                   => 0,
110         'warnings'                  => 0,
111         'overload'                  => 0,
112         'strict'                    => 0,
113         'version'                   => 0,
114         'warnings'                  => 0,
115     },
116
117     recommends      => { recommended_module_versions() },
118
119     build_requires  => {
120         'lib'                       => 0,
121         'Test::More'                => 0,
122     },
123
124     PL_files        => get_PL_files(),
125
126     script_files    => ['bin/perlcritic'],
127
128     meta_merge      => {
129         resources   => {
130             homepage    => 'http://perlcritic.com',
131             license     => 'http://dev.perl.org/licenses/',
132             Repository  => 'http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/',
133             MailingList => 'http://perlcritic.tigris.org/servlets/SummarizeList?listName=users',
134         }
135     },
136
137     add_to_cleanup => [
138         qw<
139             lib/Perl/Critic/PolicySummary.pod
140             Makefile
141             Makefile.old
142             MANIFEST
143             MANIFEST.bak
144             META.yml
145             pm_to_blib
146             README
147             t/ControlStructures/ProhibitNegativeExpressionsInUnlessAndUntilConditions.run
148             t/Variables/RequireLocalizedPunctuationVars.run
149         >,
150         test_wrappers_to_generate(),
151     ],
152 );
153
154 $builder->create_build_script();
155
156 dump_unlisted_or_optional_module_versions();
157
158 ##############################################################################
159 # Local Variables:
160 #   mode: cperl
161 #   cperl-indent-level: 4
162 #   fill-column: 78
163 #   indent-tabs-mode: nil
164 #   c-indentation-style: bsd
165 # End:
166 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :