diff --git a/srcpkgs/tesseract/files/tesseract.desktop b/srcpkgs/tesseract/files/tesseract.desktop new file mode 100644 index 00000000000..cef9a4a0125 --- /dev/null +++ b/srcpkgs/tesseract/files/tesseract.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=Application +Name=Tesseract +Comment=FPS game focused on instagib deathmatch and capture-the-flag gameplay +Exec=tesseracte +Icon=tesseract +Terminal=false +StartupNotify=false +Categories=Application;Game;ActionGame; diff --git a/srcpkgs/tesseract/files/tesseract.sh b/srcpkgs/tesseract/files/tesseract.sh new file mode 100644 index 00000000000..896d571fc1d --- /dev/null +++ b/srcpkgs/tesseract/files/tesseract.sh @@ -0,0 +1,6 @@ +#!/bin/sh +TESS_BIN=/usr/bin/ +TESS_DATA=/usr/share/tesseract-game/ +TESS_OPTIONS="-u$HOME/.tesseract" +cd "$TESS_DATA" +exec "$TESS_BIN/tesseract-client" "$TESS_OPTIONS" "$@" diff --git a/srcpkgs/tesseract/template b/srcpkgs/tesseract/template new file mode 100644 index 00000000000..072d9968345 --- /dev/null +++ b/srcpkgs/tesseract/template @@ -0,0 +1,40 @@ +# Template file for 'tesseract' +pkgname=tesseract +version=1 +revision=1 +wrksrc="$pkgname" +hostmakedepends="pkg-config ImageMagick" +makedepends="SDL2_image-devel SDL2_mixer-devel MesaLib-devel libpng-devel zlib-devel desktop-file-utils hicolor-icon-theme" +depends="desktop-file-utils hicolor-icon-theme" +short_desc="FPS game focused on instagib deathmatch and capture-the-flag gameplay" +maintainer="Juan RP " +license="zlib" +homepage="http://tesseract.gg/" +distfiles="http://download.tuxfamily.org/tesseract/tesseract_2014_05_12_first_edition_linux.tar.xz" +checksum=8d6e07dd154a40a3f593e52289335c036f06cf90a0ebc400c4650adb3395a0f4 + +pre_build() { + for dim in 16 32 48 64 128 256 512; do + convert -resize "${dim}x${dim}" media/interface/cube.png "${pkgname}${dim}.png" + done +} +do_build() { + make ${makejobs} -C src CXXFLAGS="${CXXFLAGS} -fomit-frame-pointer -ffast-math" +} +do_install() { + make STRIP= -C src install + + vmkdir usr/share/${pkgname} + vcopy media usr/share/${pkgname} + vcopy config usr/share/${pkgname} + vinstall bin_unix/native_client 755 usr/bin ${pkgname}-client + vinstall bin_unix/native_server 755 usr/bin ${pkgname}-server + vinstall src/readme_${pkgname}.txt 644 usr/share/licenses/${pkgname} LICENSE + vinstall ${FILESDIR}/${pkgname}.sh 755 usr/bin ${pkgname} + vinstall ${FILESDIR}/${pkgname}.desktop 644 usr/share/applications + + for dim in 16 32 48 64 128 256 512; do + vinstall ${pkgname}${dim}.png 644 usr/share/icons/hicolor/${dim}x${dim}/apps ${pkgname}.png + done + vinstall ${pkgname}48.png 644 usr/share/pixmaps ${pkgname}.png +}