diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2021-09-07 03:58:41 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2021-09-07 03:58:41 +0000 |
commit | fe7d9f579ebc48d7d5875164d15529f323247210 (patch) | |
tree | 1a4fc648c2ebbb1becde623eff2c2fe0da353ca1 /dehydrated/Makefile | |
parent | Renaming knot-zone-reset to knot-reset-zones for consistency. (diff) | |
download | service-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 '')
-rw-r--r-- | dehydrated/Makefile | 21 |
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 |