From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS12876 62.210.0.0/16 X-Spam-Status: No, score=-2.8 required=3.0 tests=AWL,BAYES_00,RCVD_IN_XBL, RDNS_DYNAMIC,SPF_FAIL,SPF_HELO_FAIL,TO_EQ_FM_DOM_SPF_FAIL shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from 80x24.org (62-210-116-201.rev.poneytelecom.eu [62.210.116.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 3B6551F770 for ; Wed, 2 Jan 2019 09:21:07 +0000 (UTC) From: Eric Wong To: spew@80x24.org Subject: [PATCH] wip Date: Wed, 2 Jan 2019 09:21:03 +0000 Message-Id: <20190102092103.13892-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: --- ci/GNUmakefile | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 ci/GNUmakefile diff --git a/ci/GNUmakefile b/ci/GNUmakefile new file mode 100644 index 0000000..362bd34 --- /dev/null +++ b/ci/GNUmakefile @@ -0,0 +1,63 @@ +# Copyright (C) 2019 all contributors +# License: AGPL-3.0+ + +PERL = perl +SUDO = sudo +GIT = git +GIT_URL = https://public-inbox.org/ +TMPDIR = /tmp +BUILDDIR = $(TMPDIR)/public-inbox-$@ + +cur_git_dir := $(shell $(GIT) rev-parse --git-dir) +ifneq ($(cur_git_dir),) + git_reference = --reference $(cur_git_dir) +endif + +all :: + @echo usage: + @echo $(MAKE) sid-all + @echo $(MAKE) sid-min + +sid_all := +sid_min := + +sid_min += libdatetime-perl +sid_min += libemail-mime-perl +sid_min += libplack-perl +sid_min += liburi-perl + +# Plack depends on this: +sid_min += libfilesys-notify-simple-perl + +sid_all += libdanga-socket-perl +sid_all += libdbd-sqlite3-perl +sid_all += libdbi-perl +sid_all += libplack-middleware-deflater-perl +sid_all += libplack-middleware-reverseproxy-perl +sid_all += libsearch-xapian-perl +sid_all += libsocket6-perl +sid_all += libipc-run-perl +sid_all += xapian-tools +sid_all += spamassassin +sid_all += liblinux-inotify2-perl + +sid_remove = $(addsuffix -,$(filter-out $(sid_min),$(sid_all))) + +install-debs-sid-all :: + $(SUDO) apt-get install -yqq $(sid_all) + +install-debs-sid-min :: + $(SUDO) apt-get install --purge -yqq $(sid_min) $(sid_remove) + $(SUDO) apt-get autoremove --purge -yqq + +sid-min sid-all :: + $(MAKE) install-debs-$@ build-and-test BUILDDIR=$(TMPDIR)/$@ + +build-and-test :: + $(RM) -r $(BUILDDIR) + mkdir -p $(BUILDDIR) + $(GIT) clone -q $(git_reference) $(GIT_URL) $(BUILDDIR) + cd $(BUILDDIR) && $(PERL) Makefile.PL && $(MAKE) && $(MAKE) check + $(RM) -r $(BUILDDIR) + +.NOTPARALLEL: -- 2.20.1