starvoyager (0.4.4-5.1) 01_starvoyager-deb_makefile

Summary

 Makefile |   24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

    
download this patch

Patch contents

#! /bin/sh -e
## 01_starvoyager-deb_makefile.dpatch by  <idan@tuxbox>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: New patch generated from  diff.gz

if [ $# -ne 1 ]; then
    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
    exit 1
fi
case "$1" in
    -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
    -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
    *)
        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
        exit 1;;
esac

exit 0

diff -urNad /home/idan/projects/sv/debian/0.4.4/current/Makefile current/Makefile
--- /home/idan/projects/sv/debian/0.4.4/current/Makefile	Tue Jul 22 09:28:48 2003
+++ current/Makefile	Tue Jul 22 09:32:54 2003
@@ -1,13 +1,18 @@
-PREFIX=/usr/local
-DATADIR=$(PREFIX)/share/starvoyager
+PREFIX=$(DESTDIR)/usr
+DATADIR=$(PREFIX)/share/games/starvoyager
 DOCDIR=$(PREFIX)/share/doc/starvoyager
-BINDIR=$(PREFIX)/bin
+BINDIR=$(PREFIX)/games
 VERSION=0.4.4
 
 CPPC=c++
 CC=cc
 LIBS:=`sdl-config --libs` -lSDL_net -lstdc++
 CFLAGS:=`sdl-config --cflags` -Wall -ggdb3
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+CFLAGS += -O0
+else
+CFLAGS += -O2
+endif
 #CFLAGS:=`sdl-config --cflags` -ggdb3 -Wall -Werror -ansi -pedantic
 PACKAGENAME=starvoyager-$(VERSION)-`uname -m`-`uname|tr [A-Z] [a-z]`.bin
 .SUFFIXES: .c .cc
@@ -33,15 +38,22 @@
 
 	
 #Installing
-install: all
+install:  install-data install-bin
+
+
+install-data: all
 	rm $(DATADIR) -rf
 	rm $(DOCDIR) -rf
-	mkdir -p $(BINDIR) $(DOCDIR) $(DATADIR)/gfx $(DATADIR)/snd 
+	mkdir -p $(DOCDIR) $(DATADIR)/gfx $(DATADIR)/snd 
 	cp data/gfx/* $(DATADIR)/gfx/
 	cp data/snd/* $(DATADIR)/snd/
 	cp data/*.svd $(DATADIR)/
-	cp README FAQ LGPL manual.html LICENCE $(DOCDIR)/
+
+install-bin: all
+	rm $(DOCDIR) -rf
+	mkdir -p $(BINDIR) $(DOCDIR)
 	cp starvoyager $(BINDIR)/
+	cp README FAQ manual.html $(DOCDIR)/
 	chmod 755 $(BINDIR)/starvoyager
 
 #Uninstalling