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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
$NetBSD: patch-aa,v 1.5 2009/09/23 13:34:33 tnn Exp $
--- Makefile.orig 2001-05-17 21:27:07.000000000 +0200
+++ Makefile
@@ -5,30 +5,30 @@
######################################################################
# Change the following to suit your needs
-SHELL=/bin/bash
+SHELL=${SH}
# The directory root of your installation
# If you make a personal installation, change it to your home directory
# Default: /usr
# uncomment the following line to install to the default directories...
-TREE=/usr
+TREE=${PREFIX}
# ...or the following line to install into your home directory:
# TREE=$(HOME)
# if you don't have the gd graphic library installed, you have to comment out or
# delete the following line. However, gp_map is such a nice program, so you
# better go to www.boutell.com and download the gd library.
-GDPROGRAMS=gp_map
+# GDPROGRAMS=gp_map
# Directory to install the programs themselves.
# Default: /usr/local/bin
BINDIR=$(TREE)/bin
# directory to install the manual pages
-MANDIR=$(TREE)/man
+MANDIR=$(TREE)/$(PKGMANDIR)
#directory to install the data directory
-DATADIR=$(TREE)/lib
+DATADIR=$(TREE)/share/examples
# documentation.
# If you want to install documents automagically, type:
@@ -67,18 +67,18 @@ clean:
-cd src/ ; rm $(PROGRAMS) core
install: all
- @if [ ! -O "$(BINDIR)" ] ; then \
- echo "File $(BINDIR) doesn't belong to you!" ; exit 1 ; fi
- @cd src ; cp $(PROGRAMS) $(BINDIR)
-
- @if [ ! -O "$(MANDIR)" ] ; then \
- echo "File $(MANDIR) doesn't belong to you!" ; exit 1 ; fi
- @cd man1 ; cp $(MANUALS) $(MANDIR)/man1
-
- @if [ ! -O "$(DATADIR)" ] ; then \
- echo "File $(DATADIR) doesn't belong to you!" ; exit 1 ; fi
- -cd $(DATADIR) ; mkdir genpak ;
- @cd data ; cp -i $(DATAFILES) $(DATADIR)/genpak
+# @if [ ! -O "$(BINDIR)" ] ; then \
+# echo "File $(BINDIR) doesn't belong to you!" ; exit 1 ; fi
+ @cd src ; ${BSD_INSTALL_PROGRAM} $(PROGRAMS) ${DESTDIR}$(BINDIR)
+
+# @if [ ! -O "$(MANDIR)" ] ; then \
+# echo "File $(MANDIR) doesn't belong to you!" ; exit 1 ; fi
+ @cd man1 ; ${BSD_INSTALL_MAN} $(MANUALS) ${DESTDIR}$(MANDIR)/man1
+
+# @if [ ! -O "$(DATADIR)" ] ; then \
+# echo "File $(DATADIR) doesn't belong to you!" ; exit 1 ; fi
+ ${BSD_INSTALL_DATA_DIR} ${DESTDIR}$(DATADIR)/genpak ;
+ @cd data ; ${BSD_INSTALL_DATA} $(DATAFILES) ${DESTDIR}$(DATADIR)/genpak
@echo
@echo Installation is now complete. Type
@@ -99,26 +99,26 @@ filelist:
echo "$(DATADIR)/genpak/"$$i >> FILES.TXT ; done
docs:
- @if [ ! -O "$(TREE)" ] ; \
- then echo "File $(TREE) doesn't belong to you!" ; exit 1 ; fi ; \
- if [ ! -e $(DOCDIR) ] ; \
+# @if [ ! -O "$(TREE)" ] ; \
+# then echo "File $(TREE) doesn't belong to you!" ; exit 1 ; fi ; \
+ if [ ! -d $(DOCDIR) ] ; \
then mkdir $(DOCDIR) ; fi ; \
- if [ ! -e $(DOCDIR)/gp ] ; then \
+ if [ ! -d $(DOCDIR)/gp ] ; then \
mkdir $(DOCDIR)/gp ; fi ; \
cp -r html README.TXT LICENSE.TXT CHANGES.TXT Makefile INSTALL.TXT \
$(DOCDIR)/gp ;
uninstall:
- @if [ ! -O "$(BINDIR)" ] ; \
- then echo "Directory $(BINDIR) doesn't belong to you!" ; \
- exit 1 ; fi
+# @if [ ! -O "$(BINDIR)" ] ; \
+# then echo "Directory $(BINDIR) doesn't belong to you!" ; \
+# exit 1 ; fi
@echo Removing programs...
@cd $(BINDIR) ; rm -f $(PROGRAMS)
- @if [ ! -O "$(MANDIR)" ] ; \
- then echo "Directory $(MANDIR) doesn't belong to you!" ; \
- exit 1 ; fi
+# @if [ ! -O "$(MANDIR)" ] ; \
+# then echo "Directory $(MANDIR) doesn't belong to you!" ; \
+# exit 1 ; fi
@echo Removing manuals...
@cd $(MANDIR)/man1 ; rm -f $(MANUALS)
@@ -127,9 +127,9 @@ uninstall:
@echo Are you sure you really want to remove this data? '(yes/no) '
@read ANSWER ; if [ $ANSWER != "yes" ] ; then \
echo OK, leaving $(DATADIR)/genpak untouched ; else \
- if [ ! -O "$(DATADIR)" ] ; \
- then echo "Directory $(DATADIR) doesn\'t belong to you!" ; \
- exit 1 ; fi ; \
+# if [ ! -O "$(DATADIR)" ] ; \
+# then echo "Directory $(DATADIR) doesn\'t belong to you!" ; \
+# exit 1 ; fi ; \
cd $(DATADIR)/genpak ; rm -f $(DATAFILES) ; fi
-cd $(DATADIR) ; rmdir genpak
@echo
|