File fix-makefile.patch of Package xgalaga
diff -Nur xgalaga-2.1.1.0/configure new/configure
--- xgalaga-2.1.1.0/configure 2008-03-05 22:58:16.000000000 +0100
+++ new/configure 2016-05-16 00:49:47.119080727 +0200
@@ -4660,14 +4660,14 @@
esac
cat >>confdefs.h <<_ACEOF
-#define SCOREFILE "$prefix/scores"
+#define SCOREFILE "$datadir/xgalaga/scores"
_ACEOF
cat >>confdefs.h <<_ACEOF
-#define SOUNDDIR "$prefix/sounds/"
+#define SOUNDDIR "$datadir/xgalaga/sounds/"
_ACEOF
-CREDITSFILE="$prefix/CREDITS"
+CREDITSFILE="$datadir/xgalaga/CREDITS"
cat >>confdefs.h <<_ACEOF
#define CREDITSFILE "$CREDITSFILE"
_ACEOF
@@ -4677,7 +4677,7 @@
_ACEOF
cat >>confdefs.h <<_ACEOF
-#define LEVELDIR "$prefix/levels/"
+#define LEVELDIR "$datadir/xgalaga/levels/"
_ACEOF
diff -Nur xgalaga-2.1.1.0/Makefile.in new/Makefile.in
--- xgalaga-2.1.1.0/Makefile.in 2008-03-05 22:58:16.000000000 +0100
+++ new/Makefile.in 2016-05-16 00:49:58.695163199 +0200
@@ -12,11 +12,11 @@
prefix = @prefix@
exec_prefix = @exec_prefix@
-bindir = $(exec_prefix)
-libdir = $(prefix)/lib
+bindir = @bindir@
+libdir = @libdir@
infodir = $(prefix)/info
-#mandir = @mandir@
-mandir = /usr/share/man
+mandir = @mandir@
+datadir = @datadir@/xgalaga
creditsfile = @CREDITSFILE@
distversion = 2.1.1.0
@@ -27,11 +27,11 @@
SOUNDOBJS = xgal.sndsrv.linux.o
SOUNDSRCS = xgal.sndsrv.linux.c
-SOUNDDEFS = -DSOUNDSERVER=\"$(prefix)$(SOUNDSRVDIR)/@SOUNDSERVER@\"
+SOUNDDEFS = -DSOUNDSERVER=\"$(libdir)/xgalaga/$(SOUNDSRVDIR)/@SOUNDSERVER@\"
RM = rm -f
CC = @CC@
-CFLAGS = -I. @CFLAGS@ @DEFS@ @X_CFLAGS@ -DXGALAGADIR=\"@prefix@/\" $(SOUNDDEFS)
+CFLAGS = -I. @CFLAGS@ @DEFS@ @X_CFLAGS@ -DXGALAGADIR=\"$(datadir)/\" $(SOUNDDEFS)
LDFLAGS = @LDFLAGS@
LIBS = libsprite/libsprite.a @LIBS@ @X_LIBS@
INSTALL = @INSTALL@
@@ -54,19 +54,21 @@
install: all
./mkinstalldirs $(DESTDIR)$(bindir)
- ./mkinstalldirs $(DESTDIR)$(prefix)
+ ./mkinstalldirs $(DESTDIR)$(datadir)
$(INSTALL) $(TARGET) $(DESTDIR)$(bindir)/$(TARGET)
$(INSTALL) $(TARGET2) $(DESTDIR)$(bindir)/$(TARGET2)
if test ! "$(SOUNDSRV)" = ""; then \
- $(INSTALL) $(SOUNDSRV) $(DESTDIR)$(prefix)$(SOUNDSRVDIR)/$(SOUNDSRV); \
+ ./mkinstalldirs $(DESTDIR)$(libdir)/xgalaga/$(SOUNDSRVDIR); \
+ $(INSTALL) -m755 $(SOUNDSRV) $(DESTDIR)$(libdir)/xgalaga/$(SOUNDSRVDIR)/$(SOUNDSRV); \
fi
- ./mkinstalldirs $(DESTDIR)$(prefix)/sounds
- ./mkinstalldirs $(DESTDIR)$(prefix)/levels
- for i in levels/*.xgl; do $(INSTALL) $$i $(DESTDIR)$(prefix)/$$i ; done
- for i in sounds/*.raw; do $(INSTALL) $$i $(DESTDIR)$(prefix)/$$i ; done
- $(INSTALL) CREDITS $(DESTDIR)$(creditsfile)
- $(INSTALL) xgalaga.6x.gz $(mandir)/man6/xgalaga.6x.gz
- chmod 644 $(mandir)/man6/xgalaga.6x.gz
+ ./mkinstalldirs $(DESTDIR)$(datadir)/sounds
+ ./mkinstalldirs $(DESTDIR)$(datadir)/levels
+ for i in levels/*.xgl; do $(INSTALL) -m644 $$i $(DESTDIR)$(datadir)/$$i ; done
+ for i in sounds/*.raw; do $(INSTALL) -m644 $$i $(DESTDIR)$(datadir)/$$i ; done
+ $(INSTALL) -m644 CREDITS $(DESTDIR)$(creditsfile)
+ ./mkinstalldirs $(DESTDIR)$(mandir)/man6
+ $(INSTALL) -m644 xgalaga.6x.gz $(DESTDIR)$(mandir)/man6/xgalaga.6x.gz
+ chmod 644 $(DESTDIR)$(mandir)/man6/xgalaga.6x.gz
# touch $(prefix)/scores
# chmod 666 $(prefix)/scores
# chown ${GAMEOWN}:${GAMEGRP} $(prefix)/scores