install.mk

This commit is contained in:
Philippe Pittoli 2024-12-02 17:21:08 +01:00
parent 932688dca5
commit 2402eda4ab
3 changed files with 28 additions and 0 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ drop
lib
templates/
docs/
man/*.gz

View File

@ -10,6 +10,7 @@ LOC ?= ./bin/
include mk/build.mk
include mk/commands.mk
include mk/install.mk
include mk/setup.mk
include mk/dev.mk
-include mk/migration.mk

26
mk/install.mk Normal file
View File

@ -0,0 +1,26 @@
# DESTDIR envvar is a way to install the application in a different root (for building packages for example).
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
SHAREDIR ?= $(PREFIX)/share
DOCDIR ?= $(SHAREDIR)/doc/dnsmanagerd
MANDIR ?= $(SHAREDIR)/man
install-dnsmanagerd: build-server
$(Q)install -D -m 555 ./bin/dnsmanagerd $(DESTDIR)$(BINDIR)/dnsmanagerd
install-dnsmanager-client: build-client
$(Q)install -D -m 555 ./bin/dnsmanager-client $(DESTDIR)$(BINDIR)/dnsmanager-client
install-binaries: install-dnsmanagerd install-dnsmanager-client
gz-man-dnsmanager-client:; $(Q)gzip -k --best ./man/dnsmanager-client.1
gz-man-dnsmanagerd:; $(Q)gzip -k --best ./man/dnsmanagerd.1
install-man-dnsmanagerd: gz-man-dnsmanagerd
$(Q)install -D -m 444 ./man/dnsmanagerd.1.gz $(DESTDIR)$(MANDIR)/man1/dnsmanagerd.1.gz
install-man-dnsmanager-client: gz-man-dnsmanager-client
$(Q)install -D -m 444 ./man/dnsmanager-client.1.gz $(DESTDIR)$(MANDIR)/man1/dnsmanager-client.1.gz
install-man: install-man-dnsmanagerd install-man-dnsmanager-client
install-dev-doc: doc ; install -D docs/ $(DESTDIR)$(DOCDIR)
# By default, dev documentation isn't installed.
install: install-binaries install-man #install-dev-doc