blob: 4d6ae22554de903bb454dcfc3688f4d5e5fe7dc3 (
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
diff -Nur xgalaga++-0.8.orig/Makefile xgalaga++-0.8/Makefile
--- xgalaga++-0.8.orig/Makefile 2008-05-21 18:23:56.000000000 -0500
+++ xgalaga++-0.8/Makefile 2009-04-17 23:02:18.249879314 -0500
@@ -10,7 +10,7 @@
EXE = xgalaga++
# name of manual (leave empty if none)
-MANUAL = xgalaga++.6x
+MANUAL = xgalaga++.6
# source files suffix (all source files must have the same suffix)
SOURCE_SUFFIX = cc
@@ -26,19 +26,21 @@
# installation directories
installprefix = /usr
-bindir = $(installprefix)/games
-mandir = $(installprefix)/share/man/man6
+bindir = $(installprefix)/bin
+mandir = $(installprefix)/man/man6
# preprocessor options to find all included files
-INC_PATH = -I$(srcdir) -I/usr/X11R6/include
+INC_PATH = -I$(srcdir) -I/usr/include/X11
# libraries link options ('-lm' is common to link with the math library)
-LNK_LIBS = -lm -lX11 -lXpm -L/usr/X11R6/lib/
+LNK_LIBS = -lm -lX11 -lXpm -L/usr/lib/X11/
# other compilation options
# The high scores file is only writable by the executable and shared
# by all players.
-HIGH_SCORES_FILE=/var/games/xgalaga++.scores
+SCORE_DIR=/var/games/xgalaga++
+SCORE_FILE=xgalaga++.scores
+HIGH_SCORES_FILE=$(SCORE_DIR)/$(SCORE_FILE)
#HIGH_SCORES_FILE=.xgalaga++.scores
# This group is used for the executable and high scores file.
@@ -249,10 +251,22 @@
# Installation procedure
# Customized for XGalaga++
install:
- cp $(EXE) $(bindir)
- if [ -n "$(MANUAL)" ]; then cp $(MANUAL) $(mandir); fi
- if [ -n "$(EXE_GROUP)" ]; then chgrp $(EXE_GROUP) $(bindir)/$(EXE); fi
- chmod g+s $(bindir)/$(EXE)
- touch $(HIGH_SCORES_FILE)
- if [ -n "$(EXE_GROUP)" ]; then chgrp $(EXE_GROUP) $(HIGH_SCORES_FILE); fi
- chmod 664 $(HIGH_SCORES_FILE)
+ @echo "Installing dirs under $(DESTDIR)..."
+ @install -d -m 755 $(DESTDIR)$(bindir) $(DESTDIR)$(mandir) \
+ $(DESTDIR)/usr/share/pixmaps $(DESTDIR)/usr/share/applications
+ @install -d -m 775 $(DESTDIR)/usr/share/xgalaga++
+ @echo "Installing $(EXE)..."
+ @install -c -m 755 $(EXE) $(DESTDIR)$(bindir)
+ @chgrp $(EXE_GROUP) $(DESTDIR)$(bindir)/$(EXE)
+ @chmod g+s $(DESTDIR)$(bindir)/$(EXE)
+ @echo "Installing $(MANUAL)..."
+ @install -c -m 644 $(MANUAL) $(DESTDIR)$(mandir)
+ @echo "Installing $(EXE).scores..."
+ @install -d -m 775 $(DESTDIR)$(SCORE_DIR)
+ @touch $(DESTDIR)$(HIGH_SCORES_FILE)
+ @chgrp $(EXE_GROUP) $(DESTDIR)$(HIGH_SCORES_FILE)
+ @chmod 664 $(DESTDIR)$(HIGH_SCORES_FILE)
+ @echo "Installing $(EXE).xpm..."
+ @install -c -m 644 $(EXE).xpm $(DESTDIR)/usr/share/pixmaps
+ @echo "Installing $(EXE).desktop..."
+ @install -c -m 644 $(EXE).desktop $(DESTDIR)/usr/share/applications
|