diff options
| author | nl6720 <nl6720@gmail.com> | 2023-06-12 20:55:08 +0300 |
|---|---|---|
| committer | nl6720 <nl6720@gmail.com> | 2024-02-17 11:27:19 +0200 |
| commit | 2932a9def38fbe03c3727c6f5ca4f8e888826c78 (patch) | |
| tree | 991b8b2a6311876e316fc0e657fd5d7f5442a8fd /Makefile | |
| parent | bedb75a8c39aa5f154ee4fc383374de3ef399e6d (diff) | |
| download | archiso-2932a9def38fbe03c3727c6f5ca4f8e888826c78.tar.gz archiso-2932a9def38fbe03c3727c6f5ca4f8e888826c78.tar.bz2 | |
Makefile: build and install the mkarchiso(1) man page
rst2man from python-docutils is required to convert the man page from
reStructuredText.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -4,11 +4,13 @@ PREFIX ?= /usr/local BIN_DIR=$(DESTDIR)$(PREFIX)/bin DOC_DIR=$(DESTDIR)$(PREFIX)/share/doc/archiso +MAN_DIR?=$(DESTDIR)$(PREFIX)/share/man PROFILE_DIR=$(DESTDIR)$(PREFIX)/share/archiso DOC_FILES=$(wildcard docs/*) $(wildcard *.rst) SCRIPT_FILES=$(wildcard archiso/*) $(wildcard scripts/*.sh) $(wildcard .gitlab/ci/*.sh) \ $(wildcard configs/*/profiledef.sh) $(wildcard configs/*/airootfs/usr/local/bin/*) +VERSION?=$(shell git describe --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g;s/\.r0\.g.*//') all: @@ -17,7 +19,7 @@ check: shellcheck shellcheck: shellcheck -s bash $(SCRIPT_FILES) -install: install-scripts install-profiles install-doc +install: install-scripts install-profiles install-doc install-man install-scripts: install -vDm 755 archiso/mkarchiso -t "$(BIN_DIR)/" @@ -30,4 +32,9 @@ install-profiles: install-doc: install -vDm 644 $(DOC_FILES) -t $(DOC_DIR) -.PHONY: check install install-doc install-profiles install-scripts shellcheck +install-man: + @printf '.. |version| replace:: %s\n' '$(VERSION)' > man/version.rst + install -d -m 755 $(MAN_DIR)/man1 + rst2man man/mkarchiso.1.rst $(MAN_DIR)/man1/mkarchiso.1 + +.PHONY: check install install-doc install-man install-profiles install-scripts shellcheck |
