From ab2282a59f97aad029b0d1a804dd6911ee8ec561 Mon Sep 17 00:00:00 2001
From: Link Dupont
Date: Sat, 12 Nov 2016 23:28:41 -0800
Subject: [PATCH 1/1] Initial package
---
Makefile | 1 +
files/fix-desktop-file.patch | 17 +++++++++++++++++
files/use-system-data-dir.patch | 11 +++++++++++
files/use-system-tcod.patch | 15 +++++++++++++++
package.yml | 31 +++++++++++++++++++++++++++++++
pspec_x86_64.xml | 35 +++++++++++++++++++++++++++++++++++
6 files changed, 110 insertions(+)
create mode 100644 Makefile
create mode 100644 files/fix-desktop-file.patch
create mode 100644 files/use-system-data-dir.patch
create mode 100644 files/use-system-tcod.patch
create mode 100644 package.yml
create mode 100644 pspec_x86_64.xml
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..0a42375
--- /dev/null
+++ b/Makefile
@@ -0,0 +1 @@
+include ../Makefile.common
diff --git a/files/fix-desktop-file.patch b/files/fix-desktop-file.patch
new file mode 100644
index 0000000..2782003
--- /dev/null
+++ b/files/fix-desktop-file.patch
@@ -0,0 +1,17 @@
+--- brogue.desktop.orig 2016-11-12 23:23:09.448514852 -0800
++++ brogue.desktop 2016-11-12 23:23:39.618362622 -0800
+@@ -1,11 +1,10 @@
+ [Desktop Entry]
+ Version=1.0
+ Type=Application
+-Name=Brogue 1.7.2
++Name=Brogue
+ GenericName=Roguelike
+ Comment=Brave the Dungeons of Doom!
+-Exec=/home/o/brogue-linux-1.7.2/brogue-1.7.2/brogue
+-Path=/home/o/brogue-linux-1.7.2/brogue-1.7.2
+-Icon=/home/o/brogue-linux-1.7.2/brogue-1.7.2/bin/brogue-icon.png
++Exec=/usr/bin/brogue
++Icon=/usr/share/pixmaps/brogue-icon.png
+ Terminal=false
+
diff --git a/files/use-system-data-dir.patch b/files/use-system-data-dir.patch
new file mode 100644
index 0000000..1c8caf2
--- /dev/null
+++ b/files/use-system-data-dir.patch
@@ -0,0 +1,11 @@
+--- src/platform/tcod-platform.c.orig 2016-11-12 23:19:43.719267526 -0800
++++ src/platform/tcod-platform.c 2016-11-12 23:20:08.137213006 -0800
+@@ -51,7 +51,7 @@
+
+ }
+
+- sprintf(font, "fonts/font-%i.png", brogueFontSize);
++ sprintf(font, "/usr/share/brogue/fonts/font-%i.png", brogueFontSize);
+
+ TCOD_console_set_custom_font(font, (TCOD_FONT_TYPE_GREYSCALE | TCOD_FONT_LAYOUT_ASCII_INROW), 0, 0);
+ TCOD_console_init_root(COLS, ROWS, "Brogue", false, renderer);
diff --git a/files/use-system-tcod.patch b/files/use-system-tcod.patch
new file mode 100644
index 0000000..075c59d
--- /dev/null
+++ b/files/use-system-tcod.patch
@@ -0,0 +1,15 @@
+--- Makefile.orig 2016-11-12 22:59:37.126194905 -0800
++++ Makefile 2016-11-12 23:02:53.503616223 -0800
+@@ -41,9 +41,9 @@
+ src/platform/tcod-platform.o \
+ src/platform/term.o
+
+-TCOD_DEF = -DBROGUE_TCOD -I$(LIBTCODDIR)/include
+-TCOD_DEP = ${LIBTCODDIR}
+-TCOD_LIB = -L. -L${LIBTCODDIR} ${SDL_FLAGS} -ltcod -Wl,-rpath,.
++TCOD_DEF = -DBROGUE_TCOD -I/usr/include/libtcod
++TCOD_DEP =
++TCOD_LIB = -L. ${SDL_FLAGS} -ltcod -lSDL -lm -Wl,-rpath,.
+
+ CURSES_DEF = -DBROGUE_CURSES
+ CURSES_LIB = -lncurses -lm
diff --git a/package.yml b/package.yml
new file mode 100644
index 0000000..3275295
--- /dev/null
+++ b/package.yml
@@ -0,0 +1,31 @@
+name : brogue
+version : 1.7.4
+release : 1
+source :
+ - https://sites.google.com/site/broguegame/brogue-1.7.4-linux-amd64.tbz2 : eba5f35fe317efad9c97876f117eaf7a26956c435fdd2bc1a5989f0a4f70cfd3
+license : AGPL-1.0
+component : games.rpg
+summary :
+description : Brogue is a Roguelike game for Mac OS X, Windows and Linux
+ Brogue is a Roguelike game for Mac OS X, Windows and Linux by Brian Walker. It is a direct descendant of Rogue, unlike other popular modern roguelikes, and it favors simplicity over complexity, while trying to ensure that the interactions between components will be interesting and varied. It can be played on Mac OS X, Windows, or Linux, and it is possible to play entirely with the keyboard or entirely with the mouse or a combination of the two as the player chooses.
+builddeps :
+ - sdl1-devel
+ - libtcod-devel
+ - sed
+ - desktop-file-utils
+setup : |
+ %patch -p0 < $pkgfiles/use-system-tcod.patch
+ %patch -p0 < $pkgfiles/use-system-data-dir.patch
+ %patch -p0 < $pkgfiles/fix-desktop-file.patch
+build : |
+ %make clean
+ %make
+install : |
+ /usr/bin/install -d $installdir%PREFIX%/share/brogue
+ /usr/bin/install -d $installdir%PREFIX%/share/brogue/fonts
+ /usr/bin/install -d $installdir%PREFIX%/share/pixmaps
+ /usr/bin/install -d $installdir%PREFIX%/share/applications
+ /usr/bin/install -D -m 755 bin/brogue $installdir%PREFIX%/bin/brogue
+ /usr/bin/install -D -m 644 bin/fonts/*.png $installdir%PREFIX%/share/brogue/fonts
+ /usr/bin/install -D -m 644 bin/brogue-icon.png $installdir%PREFIX%/share/pixmaps/brogue-icon.png
+ /usr/bin/desktop-file-install --dir=$installdir%PREFIX%/share/applications -m 644 brogue.desktop
diff --git a/pspec_x86_64.xml b/pspec_x86_64.xml
new file mode 100644
index 0000000..f0c4dd4
--- /dev/null
+++ b/pspec_x86_64.xml
@@ -0,0 +1,35 @@
+
+
+ brogue
+
+ Link Dupont
+ link@sub-pop.net
+
+ AGPL-1.0
+ games.rpg
+ None
+ Brogue is a Roguelike game for Mac OS X, Windows and Linux Brogue is a Roguelike game for Mac OS X, Windows and Linux by Brian Walker. It is a direct descendant of Rogue, unlike other popular modern roguelikes, and it favors simplicity over complexity, while trying to ensure that the interactions between components will be interesting and varied. It can be played on Mac OS X, Windows, or Linux, and it is possible to play entirely with the keyboard or entirely with the mouse or a combination of the two as the player chooses.
+ https://solus-project.com/sources/README.Solus
+
+
+ brogue
+ None
+ Brogue is a Roguelike game for Mac OS X, Windows and Linux Brogue is a Roguelike game for Mac OS X, Windows and Linux by Brian Walker. It is a direct descendant of Rogue, unlike other popular modern roguelikes, and it favors simplicity over complexity, while trying to ensure that the interactions between components will be interesting and varied. It can be played on Mac OS X, Windows, or Linux, and it is possible to play entirely with the keyboard or entirely with the mouse or a combination of the two as the player chooses.
+ games.rpg
+
+ /usr/bin
+ /usr/share/applications/brogue.desktop
+ /usr/share/brogue
+ /usr/share/pixmaps/brogue-icon.png
+
+
+
+
+ 2016-11-13
+ 1.7.4
+ Packaging update
+ Link Dupont
+ link@sub-pop.net
+
+
+
\ No newline at end of file
--
2.10.2