diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2023-12-30 14:14:43 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2023-12-30 14:14:43 +0100 |
commit | 9ad7d6d57c245b2edb63ca92cd8b5d435a1ac2d8 (patch) | |
tree | 198bbe7a80d62ccdbcb3a95a90109daca7432cc4 /Makefile | |
download | velstandsfanden-faircamp-9ad7d6d57c245b2edb63ca92cd8b5d435a1ac2d8.tar.gz velstandsfanden-faircamp-9ad7d6d57c245b2edb63ca92cd8b5d435a1ac2d8.tar.bz2 velstandsfanden-faircamp-9ad7d6d57c245b2edb63ca92cd8b5d435a1ac2d8.zip |
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 47 |
1 files changed, 47 insertions, 0 deletions
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) |