INSTALL: fix misnamed Debian package
[ssoma-mda.git] / Makefile.PL
1 #!/usr/bin/perl
2 # Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
3 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
4 #
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 WriteMakefile(
10         NAME => 'ssoma',
11         VERSION => '0.0.0',
12         AUTHOR => 'Eric Wong <normalperson@yhbt.net>',
13         ABSTRACT => 'some sort of mail archiver',
14         EXE_FILES => [qw/ssoma-mda ssoma ssoma-rm/],
15         PREREQ_PM => {
16                 # Keep this sorted and synced to the INSTALL document
17                 'Digest::SHA' => 0,
18                 'Email::LocalDelivery' => 0,
19                 'Email::Simple' => 0,
20                 'File::FcntlLock' => 0,
21                 'File::Path::Expand' => 0,
22                 'Net::IMAP::Simple' => 0,
23         },
24 );
25
26 sub MY::postamble {
27   <<'EOF';
28 RSYNC_DEST = ssoma.public-inbox.org:/srv/ssoma/
29 docs = INSTALL README COPYING $(shell git ls-files Documentation/ '*.txt')
30 gz_docs = $(addsuffix .gz, $(docs))
31 %.gz: %
32         gzip -9 --rsyncable < $< > $@+
33         touch -r $< $@+
34         mv $@+ $@
35
36 gz-docs: $(gz_docs)
37 rsync-docs:
38         git set-file-times $(docs)
39         $(MAKE) gz-docs
40         rsync --chmod=Fugo=r -av $(gz_docs) $(docs) $(RSYNC_DEST)
41
42 N = $(shell echo $$(( $$(nproc 2>/dev/null || echo 2) + 1)))
43 check:: pure_all
44         prove -lv -j$(N)
45
46 EOF
47 }