gkrellm-leds (0.8.0-1.2) direct (non packaging) changes

Summary

 Makefile |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

    
download this patch

Patch contents

--- gkrellm-leds-0.8.0.orig/Makefile
+++ gkrellm-leds-0.8.0/Makefile
@@ -18,6 +18,8 @@
 OBJS = gkleds.o
 IMAGES = leds.xpm
 
+DESTDIR = 
+
 INSTALL_PROG = install
 
 .PHONY : clean
@@ -45,13 +47,13 @@
 	rm -rf src/*~ src/\#*
 
 install : gkleds.so
-	@ if [ $$UID -ne 0 ]; \
+	@ if [ "$$UID" -ne 0 ]; \
 		then PLUGIN_DIR=$$HOME/.gkrellm2/plugins; \
 	elif [ -e /usr/bin/gkrellm ]; \
 		then PLUGIN_DIR=/usr/lib/gkrellm2/plugins; \
 	else \
 		PLUGIN_DIR=/usr/local/lib/gkrellm2/plugins; \
 	fi; \
-	$(INSTALL_PROG) -d $$PLUGIN_DIR; \
-	$(INSTALL_PROG) -s gkleds.so $$PLUGIN_DIR; \
+	$(INSTALL_PROG) -d $(DESTDIR)/$$PLUGIN_DIR; \
+	$(INSTALL_PROG) -s gkleds.so $(DESTDIR)/$$PLUGIN_DIR; \
 	printf "\ngkleds installed in $$PLUGIN_DIR\n"