Merge pull request #798 from fwSmit/move-config
Change config location to /etc/dunst/dunstrc
This commit is contained in:
commit
5d1b58559c
4
Makefile
4
Makefile
@ -206,7 +206,7 @@ install-dunstctl: dunstctl
|
|||||||
install -Dm755 dunstctl ${DESTDIR}${BINDIR}/dunstctl
|
install -Dm755 dunstctl ${DESTDIR}${BINDIR}/dunstctl
|
||||||
|
|
||||||
install-doc:
|
install-doc:
|
||||||
install -Dm644 dunstrc ${DESTDIR}${DATADIR}/dunst/dunstrc
|
install -Dm644 dunstrc ${DESTDIR}${SYSCONFDIR}/dunst/dunstrc
|
||||||
|
|
||||||
install-service: install-service-dbus
|
install-service: install-service-dbus
|
||||||
install-service-dbus: service-dbus
|
install-service-dbus: service-dbus
|
||||||
@ -225,7 +225,7 @@ uninstall: uninstall-service uninstall-dunstctl
|
|||||||
rm -f ${DESTDIR}${BINDIR}/dunstify
|
rm -f ${DESTDIR}${BINDIR}/dunstify
|
||||||
rm -f ${DESTDIR}${MANPREFIX}/man1/dunst.1
|
rm -f ${DESTDIR}${MANPREFIX}/man1/dunst.1
|
||||||
rm -f ${DESTDIR}${MANPREFIX}/man1/dunstctl.1
|
rm -f ${DESTDIR}${MANPREFIX}/man1/dunstctl.1
|
||||||
rm -rf ${DESTDIR}${DATADIR}/dunst
|
rm -rf ${DESTDIR}${SYSCONFDIR}/dunst
|
||||||
|
|
||||||
uninstall-dunstctl:
|
uninstall-dunstctl:
|
||||||
rm -f ${DESTDIR}${BINDIR}/dunstctl
|
rm -f ${DESTDIR}${BINDIR}/dunstctl
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# paths
|
# paths
|
||||||
PREFIX ?= /usr/local
|
PREFIX ?= /usr/local
|
||||||
BINDIR ?= ${PREFIX}/bin
|
BINDIR ?= ${PREFIX}/bin
|
||||||
|
SYSCONFDIR ?= /etc
|
||||||
DATADIR ?= ${PREFIX}/share
|
DATADIR ?= ${PREFIX}/share
|
||||||
# around for backwards compatibility
|
# around for backwards compatibility
|
||||||
MANPREFIX ?= ${DATADIR}/man
|
MANPREFIX ?= ${DATADIR}/man
|
||||||
|
@ -35,7 +35,8 @@ rules or using the output in other scripts.
|
|||||||
|
|
||||||
=head1 CONFIGURATION
|
=head1 CONFIGURATION
|
||||||
|
|
||||||
An example configuration file is included (usually /usr/share/dunst/dunstrc).
|
An example configuration file is included (usually /etc/dunst/dunstrc). Note:
|
||||||
|
this was previously /usr/share/dunst/dunstrc.
|
||||||
To change the configuration, copy this file to ~/.config/dunst/dunstrc and edit
|
To change the configuration, copy this file to ~/.config/dunst/dunstrc and edit
|
||||||
it accordingly.
|
it accordingly.
|
||||||
|
|
||||||
|
@ -54,6 +54,10 @@ static FILE *xdg_config(const char *filename)
|
|||||||
g_free(path);
|
g_free(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!f) {
|
||||||
|
f = fopen("/etc/dunst/dunstrc", "r");
|
||||||
|
}
|
||||||
|
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,27 +1,31 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Throw error any time a command fails
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
BASE="$(dirname "$(dirname "$(readlink -f "$0")")")"
|
BASE="$(dirname "$(dirname "$(readlink -f "$0")")")"
|
||||||
PREFIX="${BASE}/install"
|
DESTDIR="${BASE}/install"
|
||||||
|
PREFIX="/testprefix"
|
||||||
|
SYSCONFDIR="/sysconfdir"
|
||||||
|
|
||||||
make -C "${BASE}" SYSTEMD=1 SERVICEDIR_SYSTEMD="${PREFIX}/systemd" SERVICEDIR_DBUS="${PREFIX}/dbus" PREFIX="${PREFIX}" install
|
make -C "${BASE}" SYSTEMD=1 DESTDIR="${DESTDIR}" PREFIX="${PREFIX}" SYSCONFDIR="${SYSCONFDIR}" SERVICEDIR_SYSTEMD="/systemd" SERVICEDIR_DBUS="/dbus" install
|
||||||
|
|
||||||
diff -u <(find "${PREFIX}" -type f -printf "%P\n" | sort) - <<EOF
|
diff -u <(find "${DESTDIR}" -type f -printf "%P\n" | sort) - <<EOF
|
||||||
bin/dunst
|
|
||||||
bin/dunstctl
|
|
||||||
bin/dunstify
|
|
||||||
dbus/org.knopwob.dunst.service
|
dbus/org.knopwob.dunst.service
|
||||||
share/dunst/dunstrc
|
sysconfdir/dunst/dunstrc
|
||||||
share/man/man1/dunst.1
|
|
||||||
share/man/man1/dunstctl.1
|
|
||||||
systemd/dunst.service
|
systemd/dunst.service
|
||||||
|
testprefix/bin/dunst
|
||||||
|
testprefix/bin/dunstctl
|
||||||
|
testprefix/bin/dunstify
|
||||||
|
testprefix/share/man/man1/dunst.1
|
||||||
|
testprefix/share/man/man1/dunstctl.1
|
||||||
EOF
|
EOF
|
||||||
|
# make sure to manually sort the above values
|
||||||
|
|
||||||
make -C "${BASE}" SYSTEMD=1 SERVICEDIR_SYSTEMD="${PREFIX}/systemd" SERVICEDIR_DBUS="${PREFIX}/dbus" PREFIX="${PREFIX}" uninstall
|
make -C "${BASE}" SYSTEMD=1 DESTDIR="${DESTDIR}" PREFIX="${PREFIX}" SYSCONFDIR="${SYSCONFDIR}" SERVICEDIR_SYSTEMD="/systemd" SERVICEDIR_DBUS="/dbus" uninstall
|
||||||
|
|
||||||
if ! [ -z "$(find "${PREFIX}" -type f)" ]; then
|
if ! [ -z "$(find "${DESTDIR}" -type f)" ]; then
|
||||||
echo "Uninstall failed, following files weren't removed"
|
echo "Uninstall failed, following files weren't removed"
|
||||||
find "${PREFIX}" -type f
|
find "${DESTDIR}" -type f
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user