]> Sergey Matveev's repositories - public-inbox.git/blob - Makefile.PL
update copyright headers and email addresses
[public-inbox.git] / Makefile.PL
1 #!/usr/bin/perl -w
2 # Copyright (C) 2013-2015 all contributors <meta@public-inbox.org>
3 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
4 use strict;
5 use ExtUtils::MakeMaker;
6 my @EXE_FILES = split("\n", `git ls-files 'public-inbox*' 2>/dev/null`);
7 my $PM_FILES = `git ls-files lib '*.pm' 2>/dev/null`;
8 $PM_FILES =~ tr/\n/ /;
9
10 WriteMakefile(
11         NAME => 'PublicInbox',
12         VERSION => '0.0.0',
13         AUTHOR => 'Eric Wong <e@80x24.org>',
14         ABSTRACT => 'public-inbox server infrastructure',
15         EXE_FILES => \@EXE_FILES,
16         PREREQ_PM => {
17                 # note: we use ssoma(1) and spamc(1), NOT the Perl modules
18                 # We also depend on git through ssoma.
19                 # Keep this sorted and synced to the INSTALL document
20                 'CGI' => 0,
21                 'Date::Parse' => 0,
22                 'Email::Address' => 0,
23                 'Email::Filter' => 0,
24                 'Email::MIME' => 0,
25                 'Email::MIME::ContentType' => 0,
26                 'Encode::MIME::Header' => 0,
27                 'File::Path::Expand' => 0,
28                 'IPC::Run' => 0,
29                 'Mail::Thread' => '2.5', # 2.5+ needed for Email::Simple compat
30                 'URI::Escape' => 0,
31                 # We have more test dependencies, but do not force
32                 # users to install them
33         },
34 );
35
36 sub MY::postamble {
37   <<EOF;
38 -include Documentation/include.mk
39 my_syntax := \$(addsuffix .syntax, $PM_FILES \$(EXE_FILES))
40
41 N := \$(shell echo \$\$(( \$\$(nproc 2>/dev/null || echo 2) + 1)))
42
43 %.syntax ::
44         @\$(PERL) -I lib -c \$(subst .syntax,,\$@)
45
46 syntax:: \$(my_syntax)
47
48 check:: pure_all
49         prove -lv -j\$(N)
50
51 EOF
52 }