Description: Install binary file in $(DESTDIR)
Author: Hugh McMaster
Forwarded: not-needed
Last-Update: 2022-03-13

--- a/src/Makefile
+++ b/src/Makefile
@@ -3,6 +3,8 @@
 
 PKG_CONFIG ?= pkg-config
 STRIP ?= strip
+MKDIR_P = mkdir -p
+INSTALL ?= install
 
 ifdef APWAL_DEBUG
 CFLAGS=-g -Wall -Werror `$(PKG_CONFIG) --cflags gtk+-2.0 gthread-2.0 libxml-2.0` -DGTK_DISABLE_DEPRECATED -DAPWAL_DEBUG
@@ -36,8 +38,8 @@
 endif
 
 install: all
-	cp apwal /usr/local/bin/
-	ln -sf /usr/local/bin/apwal /usr/local/bin/apwal-editor
+	$(MKDIR_P) $(DESTDIR)/usr/bin
+	$(INSTALL) apwal $(DESTDIR)/usr/bin
 
 .c.o: $(INCS)
 	$(CC) -c $< -o $*.o $(CFLAGS)
