Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index f8f2374..bc726a6 100644
--- a/Makefile
+++ b/Makefile
@@ -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,6 +32,11 @@ install-profiles:
install-doc:
install -vDm 644 $(DOC_FILES) -t $(DOC_DIR)
+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
+
uninstall: uninstall-scripts uninstall-profiles uninstall-doc
uninstall-scripts:
@@ -42,6 +49,8 @@ uninstall-profiles:
uninstall-doc:
-rm -rf "${DOC_DIR}"
+uninstall-man:
+ -rm -rf "${MAN_DIR}/man1/mkarchiso.1
V=$(shell git describe --exact-match)
@@ -52,4 +61,4 @@ dist:
upload:
scp archiso32-$(V).tar.gz archiso32-$(V).tar.gz.sig sources.archlinux32.org:sources/
-.PHONY: check install install-doc install-profiles install-scripts shellcheck dist upload
+.PHONY: check install install-doc install-man install-profiles install-scripts shellcheck uninstall uninstall-doc uninstall-man uninstall-profiles uninstall-scripts dist upload