aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-03-27 08:32:49 -0300
committerEuAndreh <eu@euandre.org>2023-03-27 08:32:49 -0300
commitab742a1ebc61d571bb9d13d7692ef7e245bba192 (patch)
tree0329573f78946daac6fa62802d189ca53ef2e809 /Makefile
parentMakefile: Rename "result" to "system" (diff)
downloadserver-ab742a1ebc61d571bb9d13d7692ef7e245bba192.tar.gz
server-ab742a1ebc61d571bb9d13d7692ef7e245bba192.tar.xz
Build HTML and install it via CI
Notes
See CI logs with: git notes --ref=refs/notes/ci-logs show ab742a1ebc61d571bb9d13d7692ef7e245bba192 git notes --ref=refs/notes/ci-data show ab742a1ebc61d571bb9d13d7692ef7e245bba192 Exit status: 0 Duration: 27
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile41
1 files changed, 33 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 283621a..7cb462e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,30 +1,55 @@
.POSIX:
+NAME = servers
+PREFIX = /usr/local
+SHAREDIR = $(PREFIX)/share
+DOCDIR = $(SHAREDIR)/doc/$(NAME)
-all:
+all: public
-system: ALWAYS src/infrastructure/keys/SSH/root@euandre.org.id_rsa.pub.stripped
+packages system: ALWAYS \
+ src/infrastructure/keys/SSH/root@euandre.org.id_rsa.pub.stripped
rm -f $@
- guix system -v3 -r $@ build src/infrastructure/guix/$@.scm
+ guix build -r $@ -v3 -f src/infrastructure/guix/$@.scm
src/infrastructure/keys/SSH/root@euandre.org.id_rsa.pub.stripped: \
src/infrastructure/keys/SSH/root@euandre.org.id_rsa.pub.txt
- cut -d' ' -f6- < $(@D)/`basename $@ .stripped`.txt > $@
+ cut -d' ' -f6- < $(@D)/`basename $(@F) .stripped`.txt > $@
+install: all
+ mkdir -p \
+ '$(DESTDIR)$(DOCDIR)'
+ cp -R public/* '$(DESTDIR)$(DOCDIR)'
-check-shellcheck:
- sh tests/assert-shellcheck.sh
+uninstall:
+ rm -rf \
+ '$(DESTDIR)$(DOCDIR)'
+
+
+assert-scripts = \
+ tests/assert-shellcheck.sh \
+
+$(assert-scripts): ALWAYS
+ sh $@
+
+check: all $(assert-scripts)
+
+
+installcheck-docdir:
+ test -e '$(DESTDIR)$(DOCDIR)'/index.html
-check: check-shellcheck
+installcheck: installcheck-docdir
clean:
rm -rf \
- src/secrets/*.txt result result-next \
+ public/ src/secrets/*.txt packages system \
public:
+ mkdir -p public
+ echo xablau > public/index.html
prod-secrets.txt.gpg = \