From f093aec829486d76b22960802d00b891d4ba6660 Mon Sep 17 00:00:00 2001 From: Laurence Tratt Date: Wed, 3 Jan 2024 08:43:36 +0000 Subject: [PATCH] LIBDIR and EXAMPLESDIR. --- Makefile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 210a671..c263309 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,9 @@ PREFIX ?= /usr/local BINDIR ?= $(PREFIX)/bin +LIBDIR ?= $(PREFIX)/lib MANDIR ?= $(PREFIX)/man SHAREDIR ?= $(PREFIX)/share +EXAMPLESDIR ?= $(SHAREDIR)/examples .PHONY: all install test distrib @@ -19,16 +21,16 @@ install: target/release/pizauth install -d ${DESTDIR}${MANDIR}/man5 install -c -m 444 pizauth.1 ${DESTDIR}${MANDIR}/man1/pizauth.1 install -c -m 444 pizauth.conf.5 ${DESTDIR}${MANDIR}/man5/pizauth.conf.5 - install -d ${DESTDIR}${SHAREDIR}/examples/pizauth - install -c -m 444 examples/pizauth.conf ${DESTDIR}${SHAREDIR}/examples/pizauth/pizauth.conf + install -d ${DESTDIR}${EXAMPLESDIR}/pizauth + install -c -m 444 examples/pizauth.conf ${DESTDIR}${EXAMPLESDIR}/pizauth/pizauth.conf install -d ${DESTDIR}${SHAREDIR}/pizauth/bash install -c -m 444 share/bash/completion.bash ${DESTDIR}${SHAREDIR}/pizauth/bash/completion.bash ifeq ($(PLATFORM), Linux) - install -d ${DESTDIR}${PREFIX}/lib/systemd/user - install -c -m 444 lib/systemd/user/pizauth.service ${DESTDIR}${PREFIX}/lib/systemd/user/pizauth.service - install -d ${DESTDIR}${SHAREDIR}/examples/pizauth/systemd-dropins - install -c -m 444 examples/systemd-dropins/age.conf ${DESTDIR}${SHAREDIR}/examples/pizauth/systemd-dropins/age.conf - install -c -m 444 examples/systemd-dropins/gpg-dump.conf ${DESTDIR}${SHAREDIR}/examples/pizauth/systemd-dropins/gpg-dump.conf + install -d ${DESTDIR}${LIBDIR}/systemd/user + install -c -m 444 lib/systemd/user/pizauth.service ${DESTDIR}${LIBDIR}/systemd/user/pizauth.service + install -d ${DESTDIR}${EXAMPLESDIR}/pizauth/systemd-dropins + install -c -m 444 examples/systemd-dropins/age.conf ${DESTDIR}${EXAMPLESDIR}/pizauth/systemd-dropins/age.conf + install -c -m 444 examples/systemd-dropins/gpg-dump.conf ${DESTDIR}${EXAMPLESDIR}/pizauth/systemd-dropins/gpg-dump.conf endif test: