summaryrefslogtreecommitdiffstats
path: root/dehydrated/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2021-09-07 03:58:41 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2021-09-07 03:58:41 +0000
commitfe7d9f579ebc48d7d5875164d15529f323247210 (patch)
tree1a4fc648c2ebbb1becde623eff2c2fe0da353ca1 /dehydrated/Makefile
parentRenaming knot-zone-reset to knot-reset-zones for consistency. (diff)
downloadservice-tools-fe7d9f579ebc48d7d5875164d15529f323247210.tar.xz
service-tools-fe7d9f579ebc48d7d5875164d15529f323247210.zip
Adding manpage tooling for dehydrated-tools.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'dehydrated/Makefile')
-rw-r--r--dehydrated/Makefile21
1 files changed, 20 insertions, 1 deletions
diff --git a/dehydrated/Makefile b/dehydrated/Makefile
index 5a6239d..534adf8 100644
--- a/dehydrated/Makefile
+++ b/dehydrated/Makefile
@@ -58,7 +58,8 @@ test:
fi
@echo " done."
-build:
+build: share/man/*.rst
+ $(MAKE) -C share/man
install: build
mkdir -p $(DESTDIR)/etc/dehydrated/hook.d
@@ -81,7 +82,25 @@ install: build
ln -sf /usr/bin/dehydrated-nsupdate $(DESTDIR)/usr/share/dehydrated/hooks/clean_challenge.nsupdate
ln -sf /usr/bin/dehydrated-nsupdate $(DESTDIR)/usr/share/dehydrated/hooks/deploy_challenge.nsupdate
+ for SECTION in $$(seq 1 8); \
+ do \
+ if ls share/man/*.$${SECTION} > /dev/null 2>&1; \
+ then \
+ mkdir -p $(DESTDIR)/usr/share/man/man$${SECTION}; \
+ cp share/man/*.$${SECTION} $(DESTDIR)/usr/share/man/man$${SECTION}; \
+ fi; \
+ done
+
uninstall:
+ for SECTION in $$(seq 1 8); \
+ do \
+ for FILE in share/man/*.$${SECTION}; \
+ do \
+ rm -f $(DESTDIR)/usr/share/man/man$${SECTION}/$$(basename $${FILE}); \
+ done; \
+ rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/share/man/man$${SECTION} || true; \
+ done
+
rm -rf $(DESTDIR)/usr/share/dehydrated/hooks
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/share/dehydrated || true