$OpenBSD: patch-Makefile,v 1.2 2016/01/17 01:16:38 juanfra Exp $

Fix install(1) usage.

--- Makefile.orig	Mon Jul 13 12:00:56 2015
+++ Makefile	Tue Jul 28 14:05:50 2015
@@ -262,17 +262,21 @@ plugins: $(ip-y) $(op-y)
 man: $(man1) $(man7)
 
 install-main: main
-	$(INSTALL) -m755 $(bindir) cmus cmus-remote
+	${BSD_INSTALL_PROGRAM} cmus cmus-remote $(DESTDIR)$(bindir)
 
 install-plugins: plugins
-	$(INSTALL) -m755 $(libdir)/cmus/ip $(ip-y)
-	$(INSTALL) -m755 $(libdir)/cmus/op $(op-y)
+	${BSD_INSTALL_PROGRAM_DIR} $(DESTDIR)$(libdir)/cmus/ip
+	${BSD_INSTALL_PROGRAM_DIR} $(DESTDIR)$(libdir)/cmus/op
+	${BSD_INSTALL_PROGRAM} $(ip-y) $(DESTDIR)$(libdir)/cmus/ip
+	${BSD_INSTALL_PROGRAM} $(op-y) $(DESTDIR)$(libdir)/cmus/op
 
 install-data: man
-	$(INSTALL) -m644 $(datadir)/cmus $(data)
-	$(INSTALL) -m644 $(mandir)/man1 $(man1)
-	$(INSTALL) -m644 $(mandir)/man7 $(man7)
-	$(INSTALL) -m755 $(exampledir) cmus-status-display
+	${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(datadir)/cmus
+	${BSD_INSTALL_DATA} $(data) $(DESTDIR)$(datadir)/cmus
+	${BSD_INSTALL_MAN} $(man1) $(DESTDIR)$(mandir)/man1
+	${BSD_INSTALL_MAN} $(man7) $(DESTDIR)$(mandir)/man7
+	${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(exampledir)
+	${BSD_INSTALL_SCRIPT} cmus-status-display $(DESTDIR)$(exampledir)
 
 install: all install-main install-plugins install-data
 
