#!/usr/bin/perl # Copyright (C) 2013, Eric Wong and all contributors # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt) # # Note: this may be rewritten in another language in the future, # so don't depend on any public Perl API use strict; use ExtUtils::MakeMaker; WriteMakefile( NAME => 'ssoma', VERSION => '0.0.0', AUTHOR => 'Eric Wong ', ABSTRACT => 'some sort of mail archiver', EXE_FILES => [qw/ssoma-mda ssoma ssoma-rm/], PREREQ_PM => { # Keep this sorted and synced to the INSTALL document 'Digest::SHA' => 0, 'Email::LocalDelivery' => 0, 'Email::Simple' => 0, 'File::FcntlLock' => 0, 'File::Path::Expand' => 0, 'Net::IMAP::Simple' => 0, }, ); sub MY::postamble { <<'EOF'; RSYNC_DEST = ssoma.public-inbox.org:/srv/ssoma/ docs = INSTALL 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) N = $(shell echo $$(( $$(nproc 2>/dev/null || echo 2) + 1))) check:: pure_all prove -lv -j$(N) EOF }