From e4b789971d3baefed2f385868b111f1b9737521b Mon Sep 17 00:00:00 2001 From: Alberto Bertogli Date: Thu, 27 Oct 2016 01:43:45 +0100 Subject: [PATCH] Makefile: Add targets for installation This patch adds Makefile targets to install the binaries and the skeleton configuration. --- Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Makefile b/Makefile index 02c23cb..844a377 100644 --- a/Makefile +++ b/Makefile @@ -37,4 +37,18 @@ test: setsid -w ./cmd/chasquid-util/test.sh +install-binaries: chasquid chasquid-util smtp-check + mkdir -p /usr/local/bin/ + cp -a chasquid chasquid-util smtp-check /usr/local/bin/ + +install-config-skeleton: + if ! [ -d /etc/chasquid ] ; then cp -arv etc / ; fi + + if ! [ -d /var/lib/chasquid ]; then \ + mkdir -v /var/lib/chasquid; \ + chmod -v 0700 /var/lib/chasquid ; \ + chown -v mail:mail /var/lib/chasquid ; \ + fi + + .PHONY: chasquid chasquid-util smtp-check spf-check test