Use BINDIR, DATADIR and MANDIR in Makefile

This commit is contained in:
Benedikt Heine 2019-02-02 16:37:24 +01:00
parent 10ce9f36af
commit 6df6a50900
3 changed files with 11 additions and 6 deletions

View File

@ -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:

View File

@ -38,7 +38,9 @@ sudo make install
### Make parameters
- `PREFIX=<PATH>`: Set the prefix of the installation. (Default: `/usr/local`)
- `MANPREFIX=<PATH>`: Set the prefix of the manpage. (Default: `${PREFIX}/share/man`)
- `BINDIR=<PATH>`: Set the `dunst` executable's path (Default: `${PREFIX}/bin`)
- `DATADIR=<PATH>`: Set the path for shared files. (Default: `${PREFIX}/share`)
- `MANDIR=<PATH>`: Set the prefix of the manpage. (Default: `${DATADIR}/man`)
- `SYSTEMD=(0|1)`: Enable/Disable the systemd unit. (Default: detected via `pkg-config`)
- `SERVICEDIR_SYSTEMD=<PATH>`: The path to put the systemd user service file. Unused, if `SYSTEMD=0`. (Default: detected via `pkg-config`)
- `SERVICEDIR_DBUS=<PATH>`: The path to put the dbus service file. (Default: detected via `pkg-config`)

View File

@ -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