From 6df6a50900ccecf223b2560aee65924ca07a9343 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Sat, 2 Feb 2019 16:37:24 +0100 Subject: [PATCH] Use BINDIR, DATADIR and MANDIR in Makefile --- Makefile | 8 ++++---- README.md | 4 +++- config.mk | 5 ++++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 43d0d76..19971c6 100644 --- a/Makefile +++ b/Makefile @@ -157,11 +157,11 @@ clean-coverage-run: install: install-dunst install-doc install-service install-dunst: dunst doc - install -Dm755 dunst ${DESTDIR}${PREFIX}/bin/dunst + install -Dm755 dunst ${DESTDIR}${BINDIR}/dunst install -Dm644 docs/dunst.1 ${DESTDIR}${MANPREFIX}/man1/dunst.1 install-doc: - install -Dm644 dunstrc ${DESTDIR}${PREFIX}/share/dunst/dunstrc + install -Dm644 dunstrc ${DESTDIR}${DATADIR}/dunst/dunstrc install-service: install-service-dbus install-service-dbus: service-dbus @@ -173,9 +173,9 @@ install-service-systemd: service-systemd endif uninstall: uninstall-service - rm -f ${DESTDIR}${PREFIX}/bin/dunst + rm -f ${DESTDIR}${BINDIR}/dunst rm -f ${DESTDIR}${MANPREFIX}/man1/dunst.1 - rm -rf ${DESTDIR}${PREFIX}/share/dunst + rm -rf ${DESTDIR}${DATADIR}/dunst uninstall-service: uninstall-service-dbus uninstall-service-dbus: diff --git a/README.md b/README.md index 10c7e97..9102d5b 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,9 @@ sudo make install ### Make parameters - `PREFIX=`: Set the prefix of the installation. (Default: `/usr/local`) -- `MANPREFIX=`: Set the prefix of the manpage. (Default: `${PREFIX}/share/man`) +- `BINDIR=`: Set the `dunst` executable's path (Default: `${PREFIX}/bin`) +- `DATADIR=`: Set the path for shared files. (Default: `${PREFIX}/share`) +- `MANDIR=`: Set the prefix of the manpage. (Default: `${DATADIR}/man`) - `SYSTEMD=(0|1)`: Enable/Disable the systemd unit. (Default: detected via `pkg-config`) - `SERVICEDIR_SYSTEMD=`: The path to put the systemd user service file. Unused, if `SYSTEMD=0`. (Default: detected via `pkg-config`) - `SERVICEDIR_DBUS=`: The path to put the dbus service file. (Default: detected via `pkg-config`) diff --git a/config.mk b/config.mk index c242dd9..f3a0c6e 100644 --- a/config.mk +++ b/config.mk @@ -1,6 +1,9 @@ # paths PREFIX ?= /usr/local -MANPREFIX = ${PREFIX}/share/man +BINDIR ?= ${PREFIX}/bin +DATADIR ?= ${PREFIX}/share +MANPREFIX ?= ${DATADIR}/man # around for backwards compatibility +MANDIR ?= ${MANPREFIX} PKG_CONFIG ?= pkg-config