Description: Patched Makefile to be FHS compliant and rewrote CFLAGS and
LDFLAGS for hardening.
Author: Andreas "Jimmy" Gredler <jimmy@grml.org>
Index: gkrellm-tz/Makefile
===================================================================
--- gkrellm-tz.orig/Makefile
+++ gkrellm-tz/Makefile
@@ -25,8 +25,9 @@ endif
 
 GKRELLM_CFLAGS	= $(shell pkg-config gkrellm --cflags)
 GKRELLM_LDFLAGS	= $(shell pkg-config gkrellm --libs)
-CFLAGS	= -fPIC -Wall -Werror -g $(GKRELLM_CFLAGS) -DVERSION=\"$(VERSION)\"
-LDFLAGS	= -shared $(GKRELLM_LDFLAGS)
+CFLAGS += $(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS += -fPIC -Wall -g $(GKRELLM_CFLAGS) -DVERSION=\"$(VERSION)\"
+LDFLAGS += -shared $(GKRELLM_LDFLAGS)
 
 OBJS	= list.o config.o gkrellm-tz.o
 
@@ -36,7 +37,7 @@
 	@echo "Making gkrellm-tz version $(VERSION)"
 	@$(MAKE) --no-print-directory gkrellm-tz.so
 
-DEFAULT	:= 0
+DEFAULT	:= 1
 V_CC	= $(V_CC_$(V))
 V_CC_	= $(V_CC_$(DEFAULT))
 V_CC_0	= @echo "  CC  " $@;
@@ -55,6 +56,10 @@
 	$(V_CC)$(CC) $(CFLAGS) -c $< -o $@
 
 install: clean all
-	cp gkrellm-tz.so $$HOME/.gkrellm2/plugins/
+	install -D -s -m 644 gkrellm-tz.so $(DESTDIR)/usr/lib/gkrellm2/plugins/gkrellm-tz.so
+
+uninstall:
+	rm -f $(DESTDIR)/usr/lib/gkrellm2/plugins/gkrellm-tz.so
+
 clean:
 	rm -f $(OBJS) gkrellm-tz.so
