about summary refs log tree commit homepage
path: root/Makefile.PL
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2014-01-09 23:13:37 +0000
committerEric Wong <e@80x24.org>2014-01-09 22:37:54 +0000
commit3e96cf129ba5fc2834b691314c504aa363fd5cf4 (patch)
treedd5c42532049bc5dd2a420126edb9f07e9a5b9a0 /Makefile.PL
downloadpublic-inbox-3e96cf129ba5fc2834b691314c504aa363fd5cf4.tar.gz
Diffstat (limited to 'Makefile.PL')
-rw-r--r--Makefile.PL38
1 files changed, 38 insertions, 0 deletions
diff --git a/Makefile.PL b/Makefile.PL
new file mode 100644
index 00000000..e7aea949
--- /dev/null
+++ b/Makefile.PL
@@ -0,0 +1,38 @@
+#!/usr/bin/perl -w
+# Copyright (C) 2013, Eric Wong <normalperson@yhbt.net> and all contributors
+# License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+use strict;
+use ExtUtils::MakeMaker;
+WriteMakefile(
+        NAME => 'public-inbox',
+        VERSION => '0.0.0',
+        AUTHOR => 'Eric Wong <normalperson@yhbt.net>',
+        ABSTRACT => 'public-inbox.org infrastructure',
+        EXE_FILES => [qw/public-inbox-mda/],
+        PREREQ_PM => {
+                # note: we use ssoma(1) and spamc(1),
+                # NOT the Perl modules
+                'Email::MIME' => 0,
+                'Email::MIME::ContentType' => 0,
+                'Email::Filter' => 0,
+        },
+);
+
+sub MY::postamble {
+  <<'EOF';
+RSYNC_DEST = public-inbox.org:/srv/public-inbox/
+docs = README COPYING $(shell git ls-files Documentation/ '*.txt')
+gz_docs = $(addsuffix .gz, $(docs))
+%.gz: %
+        gzip -9 --rsyncable < $< > $@+
+        touch -r $< $@+
+        mv $@+ $@
+
+gz-docs: $(gz_docs)
+rsync-docs:
+        git set-file-times $(docs)
+        $(MAKE) gz-docs
+        rsync --chmod=Fugo=r -av $(gz_docs) $(docs) $(RSYNC_DEST)
+
+EOF
+}