README: add warnings about the lack of v2 support
[ssoma.git] / Makefile.PL
blob2cfa9e55bdd674b5c86bd8ad5a19d6175a109bf7
1 #!/usr/bin/perl
2 # Copyright 2013-2016 all contributors <meta@public-inbox.org>
3 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
5 # Note: this may be rewritten in another language in the future,
6 # so don't depend on any public Perl API
7 use strict;
8 use ExtUtils::MakeMaker;
9 open my $m, '<', 'MANIFEST' or die "open(MANIFEST): $!\n";
10 chomp(my @manifest = (<$m>));
11 my @EXE_FILES = grep(m!^script/!, @manifest);
12 my $PM_FILES = join(' ', grep(m!^lib/.*\.pm$!, @manifest));
14 WriteMakefile(
15 NAME => 'ssoma',
16 VERSION => '0.2.0',
17 AUTHOR => 'Eric Wong <e@80x24.org>',
18 ABSTRACT => 'some sort of mail archiver',
19 EXE_FILES => \@EXE_FILES,
20 PREREQ_PM => {
21 # Keep this sorted and synced to the INSTALL document
22 'Digest::SHA' => 0,
23 'Email::LocalDelivery' => 0,
24 'Email::MIME' => 0,
25 'IPC::Run' => 0,
26 'File::Path::Expand' => 0,
27 'Net::IMAP::Simple' => 0,
31 sub MY::postamble {
32 <<EOF;
33 -include Documentation/include.mk
34 N := \$(shell echo \$\$(( \$\$(nproc 2>/dev/null || echo 2) + 1)))
35 my_syntax := \$(addsuffix .syntax, $PM_FILES \$(EXE_FILES))
37 %.syntax ::
38 @\$(PERL) -I lib -c \$(subst .syntax,,\$@)
40 syntax:: \$(my_syntax)
43 check:: pure_all
44 prove -lv -j\$(N)
46 EOF