summaryrefslogtreecommitdiff
path: root/games/tornado/files/patch-aa
blob: b6410577fe85fddff9eec75f1717e670cafa5c33 (plain) (blame)
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
--- ../tornado-1.3.orig/Makefile	Thu Nov 20 08:26:22 2003
+++ Makefile	Sun Jan  9 14:21:24 2005
@@ -1,10 +1,9 @@
 CC = gcc
-MAKE = make
-LDFLAGS = -lncurses
+MAKE = gmake
+LDFLAGS = -L/usr/local/lib -lncurses -lintl
 OBJFILES = main.o draw.o erwin.o network.o scores.o
-PREFIX = /usr/local
-LOCALEPATH = /usr/local/share/locale
-CFLAGS = -Wall -O2 -DPREFIX="\"$(PREFIX)\"" -DLOCALEPATH="\"$(LOCALEPATH)\""
+LOCALEPATH = ${PREFIX}/share/locale
+CFLAGS += -Wall -O2 -DPREFIX="\"$(PREFIX)\"" -DLOCALEPATH="\"$(LOCALEPATH)\"" -I/usr/local/include
 VERSION = `grep " VERSION" version.h | sed s/\"//g | sed s/\#define\ VERSION\ //`
 LOCALES = de
 MAN = doc/man
@@ -50,17 +49,17 @@
 
 	$(MAKE) -C $(MAN) install-man
 
-	if [ -f "/var/games/tornado.scores" ]; then \
+	if [ -f "${PREFIX}/share/games/tornado.scores" ]; then \
 	  echo "Skipping install of the highscores file. File exists."; \
-	  cat /var/games/tornado.scores | ./convert-highscorefile > score.tmp; \
-	  mv -f score.tmp /var/games/tornado.scores; \
-	  chmod a+rw-x "/var/games/tornado.scores"; \
+          cat ${PREFIX}/share/games/tornado.scores | ./convert-highscorefile > score.tmp; \
+          mv -f score.tmp ${PREFIX}/share/games/tornado.scores; \
+          chmod a+rw-x "${PREFIX}/share/games/tornado.scores"; \
 	else \
-	  if [ ! -d "/var/games" ]; then \
-	    mkdir /var/games; \
+          if [ ! -d "${PREFIX}/share/games" ]; then \
+            mkdir ${PREFIX}/share/games; \
 	  fi; \
-	  install tornado.scores /var/games; \
-	  chmod a+w-x "/var/games/tornado.scores"; \
+          install tornado.scores ${PREFIX}/share/games; \
+          chmod a+w-x "${PREFIX}/share/games/tornado.scores"; \
 	fi
 
 install-locale-data: