void-packages/srcpkgs/mog/patches/makefile.patch
Jürgen Buchmüller 69dea38e58 New package: mog-0.63
The Maze of Galious
2015-11-18 19:53:51 +01:00

48 lines
1.4 KiB
Diff

--- build/linux/Makefile 2009-03-13 14:20:17.000000000 +0100
+++ build/linux/Makefile 2015-11-18 18:51:17.614646183 +0100
@@ -3,11 +3,12 @@
PREFIX = /usr
EXTRADIR = ./build/linux
-GAMEDIR = $(PREFIX)/games
-STARTUP = $(GAMEDIR)/$(EXE)
-BINDIR = $(PREFIX)/share/games/$(EXE)
-ICNDIR = $(PREFIX)/share/pixmaps
-APPDIR = $(PREFIX)/share/applications
+GAMEDIR = $(DESTDIR)/$(PREFIX)/share
+BINDIR = $(DESTDIR)/$(PREFIX)/share/mog
+ICNDIR = $(DESTDIR)/$(PREFIX)/share/pixmaps
+APPDIR = $(DESTDIR)/$(PREFIX)/share/applications
+USRBIN = $(DESTDIR)/$(PREFIX)/bin
+STARTUP = $(USRBIN)/mog
DATA = graphics rooms sound leeme.txt liesmich.txt readme.txt MoG-FAQ.txt LICENSE
ICON = mog.png
@@ -27,8 +27,6 @@
$(SRC)/shrines.o $(SRC)/sound.o
CC = g++
-CFLAGS = -g3 -O3 -Wno-write-strings `sdl-config --cflags`
-LDFLAGS = `sdl-config --libs` -lSDL_image -lSDL_mixer -lSDL_sound
RM = rm -f
CP = cp -r
MD = mkdir -p
@@ -42,8 +40,7 @@
$(CC) $(CFLAGS) -c $< -o $@
$(EXE): $(OBJS)
- $(CC) $(LDFLAGS) $^ -o $@
- @$(STRIP) $@
+ $(CC) $(LDFLAGS) $^ @LIBS@ -o $@
@$(ECHO) " o If there are no errors, the game compiled succesfully"
clean:
@@ -55,6 +54,7 @@
@$(CP) "$(EXE)" $(DATA) "$(BINDIR)"
@$(ECHO) " o Creating startup script $(STARTUP)"
@$(MD) "$(GAMEDIR)"
+ @$(MD) "$(USRBIN)"
@$(ECHO) "#!/bin/sh" >"$(STARTUP)"
- @$(ECHO) "cd \"$(BINDIR)\" && ./$(EXE); cd -" >>"$(STARTUP)"
+ @$(ECHO) "cd /usr/share/mog && ./$(EXE); cd -" >>"$(STARTUP)"
@$(CHMOD) 755 "$(STARTUP)"