summaryrefslogtreecommitdiff
path: root/misc/gkrellm1-weather/patches/patch-aa
blob: 4ed2acdc36e6509d4fa9207f14ea4a8654542c48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
$NetBSD: patch-aa,v 1.1.1.1 2004/02/24 23:10:43 cube Exp $

--- Makefile.orig	Sat Oct 20 01:16:36 2001
+++ Makefile
@@ -5,14 +5,16 @@
 IMLIB_LIB = `imlib-config --libs-gdk`
 
 
-FLAGS = -O2 -Wall -fPIC $(GTK_INCLUDE) $(IMLIB_INCLUDE)
+CFLAGS += -fPIC $(GTK_INCLUDE) $(IMLIB_INCLUDE) -I${PREFIX}/include
 LIBS = $(GTK_LIB) $(IMLIB_LIB)
 LFLAGS = -shared
 
-CC = gcc $(CFLAGS) $(FLAGS)
+CC = gcc $(CFLAGS)
 
 OBJS = gkrellweather.o
 
+all: gkrellweather.so
+
 gkrellweather.so: $(OBJS)
 	$(CC) $(OBJS) -o gkrellweather.so $(LFLAGS) $(LIBS)  -lpthread
 
@@ -22,23 +24,7 @@
 gkrellweather.o: gkrellweather.c
 
 install:
-	if [ -d /usr/lib/gkrellm/plugins/ ] ; then \
-		install -c -s -m 644 gkrellweather.so /usr/lib/gkrellm/plugins/ ; \
-	elif [ -d /usr/share/gkrellm/plugins/ ] ; then \
-		install -c -s -m 644 gkrellweather.so /usr/share/gkrellm/plugins/ ; \
-	elif [ -d /usr/local/lib/gkrellm/plugins/ ] ; then \
-		install -c -s -m 644 gkrellweather.so /usr/local/lib/gkrellm/plugins/ ; \
-	elif [ -d /usr/lib/gkrellm/plugins/ ] ; then \
-		install -c -s -m 644 gkrellweather.so /usr/lib/gkrellm/plugins/ ; \
-	else \
-		install -D -c -s -m 644 gkrellweather.so /usr/lib/gkrellm/plugins/gkrellweather.so ; \
-	fi
-	install -c -m 755 GrabWeather /usr/X11R6/bin
+	install -c -s -m 644 gkrellweather.so ${PREFIX}/lib/gkrellm/plugins/
 
 uninstall:
-	rm -f /usr/lib/gkrellm/plugins/gkrellweather.so
-	rm -f /usr/share/gkrellm/plugins/gkrellweather.so
-	rm -f /usr/local/lib/gkrellm/plugins/gkrellweather.so
-	rm -f /usr/lib/gkrellm/plugins/gkrellweather.so
-	rm -f /usr/X11R6/bin/GrabWeather
-
+	rm -f ${PREFIX}/lib/plugins/gkrellweather.so