summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorathena2015-08-30 13:59:27 +0200
committerathena2015-08-30 13:59:27 +0200
commitedcdfdac56f636c8f73263cc6ab50f6c81911160 (patch)
treef8724aaac4cb8c1c58d4c49f15297faf02e584bf
downloadaur-edcdfdac56f636c8f73263cc6ab50f6c81911160.tar.gz
first release of AUR package for megacorp
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD28
-rw-r--r--patch.diff198
3 files changed, 241 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..98f2d3de358b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = megacorp
+ pkgdesc = A console acquire board game
+ pkgver = 0.5
+ pkgrel = 1
+ url = http://sourceforge.net/projects/acquiregame/
+ arch = i686
+ arch = x86_64
+ license = GPL 2
+ source = http://sourceforge.net/projects/acquiregame/files/acquire/0.5.1/megacorp-0.5.1.zip/download
+ source = patch.diff
+ md5sums = 5df07b58c5aa10d02de292debd070e15
+ md5sums = d632b8d3c46f45ca89444efa7dce51fe
+
+pkgname = megacorp
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..9d9f7ef5f565
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+pkgname=('megacorp')
+pkgver=0.5
+pkgrel=1
+pkgdesc='A console acquire board game'
+url='http://sourceforge.net/projects/acquiregame/'
+license=('GPL 2')
+source=('http://sourceforge.net/projects/acquiregame/files/acquire/0.5.1/megacorp-0.5.1.zip/download'
+ 'patch.diff')
+md5sums=('5df07b58c5aa10d02de292debd070e15'
+ 'd632b8d3c46f45ca89444efa7dce51fe')
+arch=('i686' 'x86_64')
+
+package() {
+ cd "$srcdir"
+ make install DESTDIR="$pkgdir"
+ make install.train DESTDIR="$pkgdir"
+}
+
+prepare() {
+ cd "$srcdir"
+ patch <../patch.diff
+}
+
+build() {
+ cd "$srcdir"
+ make
+ make train
+}
diff --git a/patch.diff b/patch.diff
new file mode 100644
index 000000000000..b50871d3a829
--- /dev/null
+++ b/patch.diff
@@ -0,0 +1,198 @@
+diff -r ebe03b0eb26e Makefile
+--- a/Makefile Sun Aug 30 13:36:36 2015 +0200
++++ b/Makefile Sun Aug 30 13:53:48 2015 +0200
+@@ -1,59 +1,75 @@
+-BIN=megacorp
+-CC=g++
+-FLAGS=-W -Wall -pedantic -gstabs+ -O3
+-RELEASEFLAGS=-O3 -s
+-OBJS=slot.o tile.o bag.o player.o company.o board.o game.o ai.o tools.o
+-
+-all: $(BIN)
+-
+-$(BIN): $(OBJS) main.o ui.text.o
+- $(CC) $(FLAGS) -s $(OBJS) main.o ui.text.o -o $(BIN)
+-
+-train: $(OBJS) chromosome.o train.o ui.silent.o
+- $(CC) $(FLAGS) $(OBJS) chromosome.o train.o ui.silent.o -o train
+-
+-train.o: train.cpp chromosome.h game.h
+- $(CC) $(FLAGS) train.cpp -c
+-
+-chromosome.o: chromosome.cpp chromosome.h
+- $(CC) $(FLAGS) chromosome.cpp -c
+-
+-main.o: main.cpp game.h tools.h globals.h
+- $(CC) $(FLAGS) main.cpp -c
+-
+-game.o: game.cpp game.h globals.h board.h player.h company.h bag.h
+- $(CC) $(FLAGS) game.cpp -c
+-
+-ai.o: ai.cpp game.h globals.h board.h player.h company.h bag.h
+- $(CC) $(FLAGS) ai.cpp -c
+-
+-company.o: company.cpp company.h globals.h
+- $(CC) $(FLAGS) company.cpp -c
+-
+-player.o: player.cpp player.h tile.h globals.h
+- $(CC) $(FLAGS) player.cpp -c
+-
+-board.o: board.cpp board.h slot.h tile.h globals.h player.h company.h
+- $(CC) $(FLAGS) board.cpp -c
+-
+-bag.o: bag.cpp bag.h tile.h globals.h
+- $(CC) $(FLAGS) bag.cpp -c
+-
+-tile.o: tile.cpp tile.h
+- $(CC) $(FLAGS) tile.cpp -c
+-
+-slot.o: slot.cpp slot.h company.h
+- $(CC) $(FLAGS) slot.cpp -c
+-
+-tools.o: tools.cpp tools.h
+- $(CC) $(FLAGS) tools.cpp -c
+-
+-ui.text.o: ui.text.cpp game.h tools.h
+- $(CC) $(FLAGS) ui.text.cpp -c
+-
+-ui.silent.o: ui.text.cpp game.h tools.h
+- $(CC) $(FLAGS) ui.silent.cpp -c
+-
+-clean:
+- rm *.o
+- rm *.exe
++BIN=megacorp
++CC=g++
++FLAGS=-W -Wall -pedantic -gstabs+ -O3
++RELEASEFLAGS=-O3 -s
++OBJS=slot.o tile.o bag.o player.o company.o board.o game.o ai.o tools.o
++RM=rm -f
++
++MKDIR=mkdir -p
++CP=cp -p
++
++.PHONY: all clean install install.train
++
++all: $(BIN)
++
++$(BIN): $(OBJS) main.o ui.text.o
++ $(CC) $(FLAGS) -s $(OBJS) main.o ui.text.o -o $(BIN)
++
++train: $(OBJS) chromosome.o train.o ui.silent.o
++ $(CC) $(FLAGS) $(OBJS) chromosome.o train.o ui.silent.o -o train
++
++train.o: train.cpp chromosome.h game.h
++ $(CC) $(FLAGS) train.cpp -c
++
++chromosome.o: chromosome.cpp chromosome.h
++ $(CC) $(FLAGS) chromosome.cpp -c
++
++main.o: main.cpp game.h tools.h globals.h
++ $(CC) $(FLAGS) main.cpp -c
++
++game.o: game.cpp game.h globals.h board.h player.h company.h bag.h
++ $(CC) $(FLAGS) game.cpp -c
++
++ai.o: ai.cpp game.h globals.h board.h player.h company.h bag.h
++ $(CC) $(FLAGS) ai.cpp -c
++
++company.o: company.cpp company.h globals.h
++ $(CC) $(FLAGS) company.cpp -c
++
++player.o: player.cpp player.h tile.h globals.h
++ $(CC) $(FLAGS) player.cpp -c
++
++board.o: board.cpp board.h slot.h tile.h globals.h player.h company.h
++ $(CC) $(FLAGS) board.cpp -c
++
++bag.o: bag.cpp bag.h tile.h globals.h
++ $(CC) $(FLAGS) bag.cpp -c
++
++tile.o: tile.cpp tile.h
++ $(CC) $(FLAGS) tile.cpp -c
++
++slot.o: slot.cpp slot.h company.h
++ $(CC) $(FLAGS) slot.cpp -c
++
++tools.o: tools.cpp tools.h
++ $(CC) $(FLAGS) tools.cpp -c
++
++ui.text.o: ui.text.cpp game.h tools.h
++ $(CC) $(FLAGS) ui.text.cpp -c
++
++ui.silent.o: ui.text.cpp game.h tools.h
++ $(CC) $(FLAGS) ui.silent.cpp -c
++
++clean:
++ $(RM) *.o
++ $(RM) train $(BIN)
++
++install: megacorp INSTRUCTIONS
++ $(MKDIR) $(DESTDIR)/usr/bin
++ $(CP) megacorp $(DESTDIR)/usr/bin/
++ $(MKDIR) $(DESTDIR)/usr/share/megacorp
++ $(CP) INSTRUCTIONS $(DESTDIR)/usr/share/megacorp/
++
++install.train: train
++ $(MKDIR) $(DESTDIR)/usr/bin
++ $(CP) train $(DESTDIR)/usr/bin/
+diff -r ebe03b0eb26e tools.cpp
+--- a/tools.cpp Sun Aug 30 13:36:36 2015 +0200
++++ b/tools.cpp Sun Aug 30 13:53:48 2015 +0200
+@@ -18,6 +18,8 @@
+ * Boston, MA 02111-1307 USA *
+ ************************************************************************/
+
++#include <stdlib.h>
++
+ #include "tools.h"
+
+ using namespace std;
+diff -r ebe03b0eb26e ui.silent.cpp
+--- a/ui.silent.cpp Sun Aug 30 13:36:36 2015 +0200
++++ b/ui.silent.cpp Sun Aug 30 13:53:48 2015 +0200
+@@ -23,9 +23,8 @@
+ * Displays the board, players, and companies. Optimized for at *
+ * least 25 rows and 80 columns. *
+ ************************************************************************/
+-void Game::printInfo( bool showTiles )
++void Game::printInfo( bool )
+ {
+- showTiles = false;
+ }
+
+ /************************************************************************
+@@ -49,9 +48,8 @@
+ * is true, the tiles that player 'turn' has in his/her hand is also *
+ * displayed (if any of those tiles are on the row being printed) *
+ ************************************************************************/
+-void Board::displayRow( unsigned int row, bool showTiles, Player *turn ) const
++void Board::displayRow( unsigned int, bool, Player * ) const
+ {
+- row = 0; showTiles = false; turn = NULL;
+ }
+
+ void Game::displayMessages( )
+@@ -65,9 +63,8 @@
+ return options[0];
+ }
+
+-unsigned int getValidInteger( unsigned int min, unsigned int max, string prompt )
++unsigned int getValidInteger( unsigned int min, unsigned int, string )
+ {
+- max = 0; prompt = "";
+ return min;
+ }
+
+diff -r ebe03b0eb26e ui.text.cpp
+--- a/ui.text.cpp Sun Aug 30 13:36:36 2015 +0200
++++ b/ui.text.cpp Sun Aug 30 13:53:48 2015 +0200
+@@ -345,7 +345,7 @@
+ ifstream in;
+ char str[80];
+
+- in.open( "./INSTRUCTIONS");
++ in.open( "/usr/share/megacorp/INSTRUCTIONS");
+ if ( !in ) {
+ cout << "Can't find instructions file.\n";
+ cout << "Make sure the file INSTRUCTIONS is in the same"