mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
games/tome4: Script cleanup.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
52a216c1b2
commit
37959ea0d2
7 changed files with 33 additions and 55 deletions
|
@ -1,20 +0,0 @@
|
|||
--- t-engine4-src-1.1.5/build/TEngine.make.original 2014-03-17 11:45:51.098815414 +0200
|
||||
+++ t-engine4-src-1.1.5/build/TEngine.make 2014-03-17 11:46:28.742344806 +0200
|
||||
@@ -32,7 +32,7 @@
|
||||
TARGETDIR = ../bin/Debug
|
||||
TARGET = $(TARGETDIR)/t-engine
|
||||
DEFINES += -DGLEW_STATIC -D_DEFAULT_VIDEOMODE_FLAGS_='SDL_HWSURFACE|SDL_DOUBLEBUF' -DTENGINE_HOME_PATH='".t-engine"' -DTE4CORE_VERSION=17 -DSELFEXE_LINUX
|
||||
- INCLUDES += -I../src -I../src/luasocket -I../src/fov -I../src/expat -I../src/lxp -I../src/libtcod_import -I../src/physfs -I../src/zlib -I../src/bzip2 -I/opt/SDL-2.0/include/SDL2 -I/usr/include/GL -I../src/luajit2/src -I../src/luajit2/dynasm
|
||||
+ INCLUDES += -I../src -I../src/luasocket -I../src/fov -I../src/expat -I../src/lxp -I../src/libtcod_import -I../src/physfs -I../src/zlib -I../src/bzip2 -I/usr/include/SDL2 -I/usr/include/GL -I../src/luajit2/src -I../src/luajit2/dynasm
|
||||
CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES)
|
||||
CFLAGS += $(CPPFLAGS) $(ARCH) -g -ggdb -O3
|
||||
CXXFLAGS += $(CFLAGS)
|
||||
@@ -56,7 +56,7 @@
|
||||
TARGETDIR = ../bin/Release
|
||||
TARGET = $(TARGETDIR)/t-engine
|
||||
DEFINES += -DGLEW_STATIC -DNDEBUG=1 -D_DEFAULT_VIDEOMODE_FLAGS_='SDL_HWSURFACE|SDL_DOUBLEBUF' -DTENGINE_HOME_PATH='".t-engine"' -DTE4CORE_VERSION=17 -DSELFEXE_LINUX
|
||||
- INCLUDES += -I../src -I../src/luasocket -I../src/fov -I../src/expat -I../src/lxp -I../src/libtcod_import -I../src/physfs -I../src/zlib -I../src/bzip2 -I/opt/SDL-2.0/include/SDL2 -I/usr/include/GL -I../src/luajit2/src -I../src/luajit2/dynasm
|
||||
+ INCLUDES += -I../src -I../src/luasocket -I../src/fov -I../src/expat -I../src/lxp -I../src/libtcod_import -I../src/physfs -I../src/zlib -I../src/bzip2 -I/usr/include/SDL2 -I/usr/include/GL -I../src/luajit2/src -I../src/luajit2/dynasm
|
||||
CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES)
|
||||
CFLAGS += $(CPPFLAGS) $(ARCH) -O2 -fomit-frame-pointer -O2
|
||||
CXXFLAGS += $(CFLAGS)
|
|
@ -1,5 +1,3 @@
|
|||
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
|
||||
if [ -x /usr/bin/gtk-update-icon-cache ]; then
|
||||
/usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
|
||||
fi
|
||||
if [ -x /usr/bin/update-desktop-database ]; then
|
||||
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
|
||||
fi
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
--- t-engine4-src-1.1.5/build/physfs.make.original 2014-03-17 11:20:03.904158009 +0200
|
||||
+++ t-engine4-src-1.1.5/build/physfs.make 2014-03-17 11:20:43.826658909 +0200
|
||||
@@ -32,7 +32,7 @@
|
||||
TARGETDIR = ../bin/Debug
|
||||
TARGET = $(TARGETDIR)/libphysfs.a
|
||||
DEFINES += -DGLEW_STATIC -DPHYSFS_SUPPORTS_ZIP
|
||||
- INCLUDES += -I../src -I../src/luasocket -I../src/fov -I../src/expat -I../src/lxp -I../src/libtcod_import -I../src/physfs -I../src/zlib -I../src/bzip2 -I/opt/SDL-2.0/include/SDL2 -I/usr/include/GL -I../src/luajit2/src -I../src/luajit2/dynasm
|
||||
+ INCLUDES += -I../src -I../src/luasocket -I../src/fov -I../src/expat -I../src/lxp -I../src/libtcod_import -I../src/physfs -I../src/zlib -I../src/bzip2 -I/usr/include/SDL2 -I/usr/include/GL -I../src/luajit2/src -I../src/luajit2/dynasm
|
||||
CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES)
|
||||
CFLAGS += $(CPPFLAGS) $(ARCH) -g -ggdb -O3
|
||||
CXXFLAGS += $(CFLAGS)
|
||||
@@ -54,7 +54,7 @@
|
||||
TARGETDIR = ../bin/Release
|
||||
TARGET = $(TARGETDIR)/libphysfs.a
|
||||
DEFINES += -DGLEW_STATIC -DNDEBUG=1 -DPHYSFS_SUPPORTS_ZIP
|
||||
- INCLUDES += -I../src -I../src/luasocket -I../src/fov -I../src/expat -I../src/lxp -I../src/libtcod_import -I../src/physfs -I../src/zlib -I../src/bzip2 -I/opt/SDL-2.0/include/SDL2 -I/usr/include/GL -I../src/luajit2/src -I../src/luajit2/dynasm
|
||||
+ INCLUDES += -I../src -I../src/luasocket -I../src/fov -I../src/expat -I../src/lxp -I../src/libtcod_import -I../src/physfs -I../src/zlib -I../src/bzip2 -I/usr/include/SDL2 -I/usr/include/GL -I../src/luajit2/src -I../src/luajit2/dynasm
|
||||
CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES)
|
||||
CFLAGS += $(CPPFLAGS) $(ARCH) -O2 -fomit-frame-pointer -O2
|
||||
CXXFLAGS += $(CFLAGS)
|
11
games/tome4/premake4_sdl.patch
Normal file
11
games/tome4/premake4_sdl.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- t-engine4-src-1.1.5/premake4.original.lua 2014-04-29 02:40:07.535906248 +0300
|
||||
+++ t-engine4-src-1.1.5/premake4.lua 2014-04-29 02:40:46.953413461 +0300
|
||||
@@ -17,7 +17,7 @@
|
||||
"src/physfs",
|
||||
"src/zlib",
|
||||
"src/bzip2",
|
||||
- "/opt/SDL-2.0/include/SDL2",
|
||||
+ "/usr/include/SDL2",
|
||||
"/usr/include/GL",
|
||||
}
|
||||
if _OPTIONS.lua == "default" then includedirs{"src/lua"}
|
|
@ -25,7 +25,7 @@
|
|||
PRGNAM=tome4
|
||||
SRCNAM=t-engine4-src
|
||||
VERSION=${VERSION:-1.1.5}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
|
@ -63,6 +63,8 @@ cd $TMP
|
|||
rm -rf $SRCNAM-$VERSION
|
||||
tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
|
||||
cd $SRCNAM-$VERSION
|
||||
# extract icons
|
||||
unzip -oj -qq game/engines/te4-1.1.5.teae -d icons
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
|
@ -70,25 +72,32 @@ find -L . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
# correction of SDL2 headers directory
|
||||
patch -p1 < $CWD/premake4_sdl.patch
|
||||
|
||||
# build game
|
||||
premake4 gmake
|
||||
patch -p1 < $CWD/physfs_sdl.patch build/physfs.make
|
||||
patch -p1 < $CWD/TEngine_sdl.patch build/TEngine.make
|
||||
make
|
||||
|
||||
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
|
||||
mkdir -p $PKG/usr/share/games/$PRGNAM-$VERSION
|
||||
cp -rf game $PKG/usr/share/games/$PRGNAM-$VERSION
|
||||
cp -rf bootstrap $PKG/usr/share/games/$PRGNAM-$VERSION
|
||||
install -m 0755 t-engine $PKG/usr/share/games/$PRGNAM-$VERSION
|
||||
install -m 0755 $CWD/$PRGNAM.sh $PKG/usr/share/games/$PRGNAM-$VERSION
|
||||
# copy the data game
|
||||
mkdir -p $PKG/usr/share/games/$PRGNAM $PKG/usr/bin
|
||||
cp -rf game $PKG/usr/share/games/$PRGNAM
|
||||
cp -rf bootstrap $PKG/usr/share/games/$PRGNAM
|
||||
|
||||
# install the game executable and the launcher
|
||||
install -D -m0755 t-engine $PKG/usr/share/games/$PRGNAM
|
||||
install -D -m0755 $CWD/$PRGNAM.sh $PKG/usr/bin/$PRGNAM
|
||||
|
||||
# install .desktop
|
||||
mkdir -p $PKG/usr/share/applications
|
||||
install -D -m644 $CWD/$PRGNAM.desktop $PKG/usr/share/applications/$PRGNAM.desktop
|
||||
|
||||
# install icon game
|
||||
mkdir -p $PKG/usr/share/pixmaps/
|
||||
install -D -m644 $CWD/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.svg
|
||||
install -D -m644 icons/te4-icon.png $PKG/usr/share/pixmaps/$PRGNAM.png
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a CONTRIBUTING COPYING* CREDITS $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Name= ToME (RPG)
|
||||
Name[he]= ToME
|
||||
Comment= Tales of Maj’Eyal - Action Role-Playing Game
|
||||
Exec=/usr/share/games/tome4-1.1.5/./tome4.sh
|
||||
Exec=tome4
|
||||
Icon=tome4
|
||||
Terminal=false
|
||||
Type=Application
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
cd /usr/share/games/tome4-1.1.5
|
||||
cd /usr/share/games/tome4
|
||||
./t-engine
|
||||
|
|
Loading…
Reference in a new issue