t/all: IPC::Run is optional in tests
[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                 'Email::LocalDelivery' => 0,
17                 'Email::Simple' => 0,
18                 'File::FcntlLock' => 0,
19                 'Net::IMAP::Simple' => 0,
20                 'Digest::SHA' => 0,
21         },
22 );
23
24 sub MY::postamble {
25   <<'EOF';
26 RSYNC_DEST = ssoma.public-inbox.org:/srv/ssoma/
27 docs = INSTALL README COPYING $(shell git ls-files Documentation/ '*.txt')
28 gz_docs = $(addsuffix .gz, $(docs))
29 %.gz: %
30         gzip -9 --rsyncable < $< > $@+
31         touch -r $< $@+
32         mv $@+ $@
33
34 gz-docs: $(gz_docs)
35 rsync-docs:
36         git set-file-times $(docs)
37         $(MAKE) gz-docs
38         rsync --chmod=Fugo=r -av $(gz_docs) $(docs) $(RSYNC_DEST)
39
40 EOF
41 }