From 0a253778a4febaa33088d58f97f747f48dec24d3 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 11 Jan 2023 00:27:11 +0000 Subject: [PATCH] New configuration setup script: install Signed-off-by: Ian Jackson --- .gitignore | 1 + Makefile | 14 ++++++++++++-- debian/hippotat-common.install | 1 + 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1fded1e..1baa4c2 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /docs/doctrees /stamp /tmp +/hippotat-setup-permissions.8 diff --git a/Makefile b/Makefile index c611c2a..ae6e1fa 100644 --- a/Makefile +++ b/Makefile @@ -37,6 +37,8 @@ rsrcs = $(shell $(foreach x,$(MAKEFILE_FIND_X),set -$x;)\ stamp=@mkdir -p stamp; touch $@ TESTS=$(notdir $(wildcard test/t-*[^~])) +MAN8PAGES=hippotat-setup-permissions.8 +MANPAGES=$(MAN8PAGES) all: cargo-build doc @@ -56,7 +58,7 @@ stamp/t-%: test/t-% stamp/cargo-build $(wildcard test/*[^~]) $(abspath test/go-with-unshare test/t-$*) @echo OK t-$*; touch $@ -doc: docs/html/index.html +doc: docs/html/index.html $(MANPAGES) @echo 'Documentation can now be found here:' @echo ' file://$(PWD)/$<' @@ -64,14 +66,22 @@ docs/html/index.html: docs/conf.py $(wildcard docs/*.md docs/*.rst docs/*.png) rm -rf docs/html $(SPHINXBUILD) -M html docs docs $(SPHINXOPTS) +hippotat-setup-permissions%: hippotat-setup-permissions%.pod + m=$@; pod2man --section=$${m##*.} --date="Hippotat" \ + --center=" " --name=$${m%.*} \ + $^ $@ + doch=/usr/share/doc/hippotat/ install: all - $(INSTALL) -d $(DESTDIR)/usr/{bin,sbin} $(DESTDIR)$(doch) + $(INSTALL) -d $(DESTDIR)/usr/{bin,sbin} + $(INSTALL) -d $(DESTDIR)$(doch) $(DESTDIR)$(man8dir) $(INSTALL) -m 755 $(TARGET_RELEASE_DIR)/hippotat $(DESTDIR)/usr/bin/. $(INSTALL) -m 755 $(TARGET_RELEASE_DIR)/hippotatd $(DESTDIR)/usr/sbin/. + $(INSTALL) -m 755 hippotat-setup-permissions $(DESTDIR)/usr/bin/. cp -r docs/html $(DESTDIR)$(doch) $(INSTALL) -m 644 PROTOCOL.txt $(DESTDIR)$(doch)/ + $(INSTALL) -m 644 $(MAN8PAGES) $(DESTDIR)$(man8dir)/. clean: rm -rf stamp/* doc/html diff --git a/debian/hippotat-common.install b/debian/hippotat-common.install index 230a074..5e50dab 100644 --- a/debian/hippotat-common.install +++ b/debian/hippotat-common.install @@ -1 +1,2 @@ +usr/bin/hippotat-setup-permissions usr/share/doc/hippotat -- 2.30.2