$NetBSD: patch-Makefile,v 1.8 2023/04/24 08:29:26 wiz Exp $

Use BSD_INSTALL.
Fix find(1) usage on non-GNU systems.

--- Makefile.orig	2023-04-20 16:55:58.000000000 +0000
+++ Makefile
@@ -35,7 +35,7 @@ LDFLAGS := ${DEFAULT_LDFLAGS} ${LDFLAGS}
 
 ifeq (0,${WAYLAND})
 # without wayland support
-SRC := $(sort $(shell ${FIND} src/ -not \( -path src/wayland -prune \) -name '*.c'))
+SRC := $(sort $(shell ${FIND} src/ ! \( -path src/wayland -prune \) -name '*.c'))
 else
 # with Wayland support
 SRC := $(sort $(shell ${FIND} src/ -name '*.c'))
@@ -187,22 +187,22 @@ clean-wayland-protocols:
 install: install-dunst install-dunstctl install-dunstrc install-service 
 
 install-dunst: dunst doc
-	install -Dm755 dunst ${DESTDIR}${BINDIR}/dunst
-	install -Dm644 docs/dunst.1 ${DESTDIR}${MANPREFIX}/man1/dunst.1
-	install -Dm644 docs/dunst.5 ${DESTDIR}${MANPREFIX}/man5/dunst.5
-	install -Dm644 docs/dunstctl.1 ${DESTDIR}${MANPREFIX}/man1/dunstctl.1
+	${BSD_INSTALL_PROGRAM} dunst ${DESTDIR}${BINDIR}/dunst
+	${BSD_INSTALL_DATA} docs/dunst.1 ${DESTDIR}${MANPREFIX}/man1/dunst.1
+	${BSD_INSTALL_DATA} docs/dunst.5 ${DESTDIR}${MANPREFIX}/man5/dunst.5
+	${BSD_INSTALL_DATA} docs/dunstctl.1 ${DESTDIR}${MANPREFIX}/man1/dunstctl.1
 
 install-dunstctl: dunstctl
-	install -Dm755 dunstctl ${DESTDIR}${BINDIR}/dunstctl
+	${BSD_INSTALL_SCRIPT} dunstctl ${DESTDIR}${BINDIR}/dunstctl
 
 ifeq (1,${SYSCONF_FORCE_NEW})
 install-dunstrc:
-	install -Dm644 dunstrc ${DESTDIR}${SYSCONFFILE}
+	${BSD_INSTALL_DATA} dunstrc ${DESTDIR}${SYSCONFFILE}
 endif
 
 install-service: install-service-dbus
 install-service-dbus: service-dbus
-	install -Dm644 org.knopwob.dunst.service ${DESTDIR}${SERVICEDIR_DBUS}/org.knopwob.dunst.service
+	${BSD_INSTALL_DATA} org.knopwob.dunst.service ${DESTDIR}${SERVICEDIR_DBUS}/org.knopwob.dunst.service
 ifneq (0,${SYSTEMD})
 install-service: install-service-systemd
 install-service-systemd: service-systemd
@@ -212,7 +212,7 @@ endif
 ifneq (0,${DUNSTIFY})
 install: install-dunstify
 install-dunstify: dunstify
-	install -Dm755 dunstify ${DESTDIR}${BINDIR}/dunstify
+	${BSD_INSTALL_PROGRAM} dunstify ${DESTDIR}${BINDIR}/dunstify
 endif
 
 uninstall: uninstall-keepconf
