This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
deb-galacticdynasty/galacticdynasty/debian/patches/fix-makefile.patch
2019-05-08 22:57:11 +10:00

66 lines
1.8 KiB
Diff

--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,59 @@
all:GalacticDynasty
main.o:
- gcc -c main.cpp
+ if [ ! -e odoors ] ; \
+ then \
+ git clone git://git.magickabbs.com/odoors ; \
+ fi
+
+ cd odoors ; \
+ make
+
+ cd ..
+
+ gcc -c main.c -o main.o -I./odoors/ -I/usr/include/lua5.3 ; \
+ gcc -c interbbs2.c -o interbbs2.o ; \
+ gcc -c inih/ini.c -o inih/ini.o ; \
+ gcc -o GalacticDynasty main.o interbbs2.o inih/ini.o odoors/libs-`uname -s`/libODoors.a -lsqlite3 -llua5.3
interbbs2.o:
- gcc -c interbbs2.cpp
+ #gcc -c interbbs2.cpp
+ echo "NOOP"
GalacticDynasty: main.o interbbs2.o
- g++ -o GalacticDynasty main.o interbbs2.o -lODoors -lsqlite3
+ #g++ -o GalacticDynasty main.o interbbs2.o -lODoors -lsqlite3
+ echo "NOOP"
+
+clean:
+ rm -f *.o inih/*.o
+ rm -rf odoors
+ rm -f GalacticDynasty
+
+DOOR_FILES=/var/door/galacticdynasty
+DOOR_DOC=$(PREFIX)/share/doc/galacticdynasty
+DOOR_BIN=$(PREFIX)/bin
+BINNAME=GalacticDynasty
+
+install-dirs:
+ @if [ ! -d "$(DESTDIR)$(DOOR_FILES)" ] ; then \
+ mkdir -p "$(DESTDIR)$(DOOR_FILES)" ; \
+ chmod 755 "$(DESTDIR)$(DOOR_FILES)" ; \
+ fi
+ @if [ ! -d "$(DESTDIR)$(DOOR_BIN)" ] ; then \
+ mkdir -p "$(DESTDIR)/$(DOOR_BIN)" ; \
+ chmod 755 "$(DESTDIR)/$(DOOR_BIN)" ; \
+ fi
+
+install:
+ @$(MAKE) install-dirs
+ if [ -f "$(BINNAME)" ] ; then \
+ cp "$(BINNAME)" "$(DESTDIR)/$(DOOR_BIN)" ; \
+ chmod 755 "$(DESTDIR)$(DOOR_BIN)/$(BINNAME)" ; \
+ chown root:root "$(DESTDIR)$(DOOR_BIN)/$(BINNAME)" ; \
+ fi
+ cp *.asc *.ans *.ini events.lua reset.sh start.sh "$(DESTDIR)$(DOOR_FILES)"
+ chmod +x "$(DESTDIR)$(DOOR_FILES)"/start.sh
+ cp EXAMPLE.CFG "$(DESTDIR)$(DOOR_FILES)/BBS.CFG"
+ mkdir -p $(DESTDIR)$(DOOR_DOC)
+ cp linmyst.txt "$(DESTDIR)$(DOOR_DOC)"
+ tar --wildcards -C "$(DESTDIR)$(DOOR_FILES)" --strip-components=1 -xzf ../galacticdynasty_0.9.8.orig.tar.gz \*orig