summaryrefslogtreecommitdiff
path: root/games/agm/patches/patch-Makefile
blob: e398d2bd4ccd95b617764436ee84a652391e40ee (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
$NetBSD: patch-Makefile,v 1.1 2016/07/27 20:37:27 kamil Exp $

Adapt install target for pkgsrc.

--- Makefile.orig	1998-03-18 01:02:29.000000000 +0000
+++ Makefile
@@ -40,6 +40,7 @@
 RELEASE=-DRELEASE=\"1.3\"
 # Set this to the destination directory for the executable
 #BINDIR=../../bin/`uname`
+DESTDIR?=
 BINDIR=/usr/local/bin
 # Location of manual pages
 #MANDIR=../../man
@@ -93,18 +94,22 @@ sample_output: agm
 	./agm -c2 williamshatner leonardnimoy > sample_output
 
 $(MANDIR)/man6:
-	mkdir $(MANDIR)/man6
+	install -d $(DESTDIR)$(MANDIR)/man6
 
 install: agm agm.6 $(MANDIR)/man6
-	strip agm
-	cp {,x}agm $(BINDIR)
-	chmod 755 $(BINDIR)/{,x}agm
-	cp agm.6 $(MANDIR)/man6
-	chmod 644 $(MANDIR)/man6/agm.6
+	install -d $(DESTDIR)$(BINDIR)
+	cp agm $(DESTDIR)$(BINDIR)
+	cp xagm $(DESTDIR)$(BINDIR)
+	chmod 755 $(DESTDIR)$(BINDIR)/agm
+	chmod 755 $(DESTDIR)$(BINDIR)/xagm
+	install -d $(DESTDIR)$(MANDIR)/man6
+	cp agm.6 $(DESTDIR)$(MANDIR)/man6
+	chmod 644 $(DESTDIR)$(MANDIR)/man6/agm.6
 
 install-words:
-	cp words $(WORDDIR)
-	chmod 644 $(WORDDIR)/words
+	install -d $(DESTDIR)$(WORDDIR)
+	cp words $(DESTDIR)$(WORDDIR)
+	chmod 644 $(DESTDIR)$(WORDDIR)/words
 
 clean:
 	rm -f agm agm.o agm*.tar* agm*.shar agm.ps *.o