From 9ad7d6d57c245b2edb63ca92cd8b5d435a1ac2d8 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 30 Dec 2023 14:14:43 +0100 Subject: Initial commit. --- Makefile | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cc098e6 --- /dev/null +++ b/Makefile @@ -0,0 +1,47 @@ +# Makefile for Velstandsfanden website. +# +# The site is mainly a faircamp site, but with a few external +# resources. As faircamp itself is not meant to build a full +# website, we tie it all together using a Makefile. +# +all: build + +# +# Include local overrides +# +-include Makefile.local + +# +# Override these variables by setting creating a "Makefile.local" +# and defined them there. Only the variables you want to override +# needs to be defined in Makefile.local +# +FAIRCAMP_BIN?=faircamp +CATALOG_DIR?=./faircamp +BUILD_DIR?=$(CATALOG_DIR)/.faircamp_build + +build: + $(FAIRCAMP_BIN) --catalog-dir=$(CATALOG_DIR) + python aggregator/aggregator.py refresh + cp sider/*.{html,jpg} $(BUILD_DIR)/ + +# +# Deploying will only work if the DEPLOY_TARGET variable is set. +# Define it in "Makefile.local". It should typically be something +# like: +# +# username@example.com:target_path +# +deploy: build +ifndef DEPLOY_TARGET + $(error "DEPLOY_TARGET must be set!") +endif + rsync -avzz $(BUILD_DIR)/* $(DEPLOY_TARGET) + +# +# Since we have content external to Faircamp included in the site, +# use a simple web server to serve the preview instead of the one +# built into faircamp +# +preview: build + devd -a $(BUILD_DIR) -- cgit v1.2.3