diff options
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 |