summaryrefslogtreecommitdiff
path: root/pcr/terasology
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-11-18 00:47:40 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-11-18 00:51:29 -0300
commita9724827fcddb4b9a2e5a3dcf47d8ae2f3af9b1d (patch)
treefc0e23e397471411f93e72f0643745f982ef2f66 /pcr/terasology
parentcab84bf1db2678976bbef5bda7ec8ce42147f82a (diff)
downloadabslibre-a9724827fcddb4b9a2e5a3dcf47d8ae2f3af9b1d.tar.gz
abslibre-a9724827fcddb4b9a2e5a3dcf47d8ae2f3af9b1d.tar.bz2
abslibre-a9724827fcddb4b9a2e5a3dcf47d8ae2f3af9b1d.zip
terasology: add new package to [pcr]
Diffstat (limited to 'pcr/terasology')
-rw-r--r--pcr/terasology/PKGBUILD66
-rwxr-xr-xpcr/terasology/terasology2
-rw-r--r--pcr/terasology/terasology.desktop9
3 files changed, 77 insertions, 0 deletions
diff --git a/pcr/terasology/PKGBUILD b/pcr/terasology/PKGBUILD
new file mode 100644
index 000000000..f4f3456ca
--- /dev/null
+++ b/pcr/terasology/PKGBUILD
@@ -0,0 +1,66 @@
+# Maintainer: André Silva <emulatorman@parabola.nu>
+
+pkgname=terasology
+_enginever=0.54.4
+pkgver=60
+pkgrel=1
+pkgdesc="Yet another high resolution game with blocks like Minecraft!"
+arch=('any')
+license=('Apache')
+url="http://terasology.org"
+options=('!strip')
+depends=('jdk8-openjdk' 'xorg-server-utils' 'openal')
+makedepends=('gradle' 'unzip')
+source=(
+ terasology-${_enginever}.tar.gz::"https://github.com/MovingBlocks/Terasology/archive/v${_enginever}.tar.gz"
+ "${pkgname}"
+ "${pkgname}.desktop"
+)
+sha512sums=(
+ 'd7228ef6ad5aaa381615b28fafa105d9557d661226b27950e4e09bb3a952b83d3a91c717db604ae145d3293d9c18d13587d3ef1474aa09aea57897a5f67533a6'
+ 'f94c1ac3d85e4fb91cc47056eeec3648d02be9090252401acb740af8c0580623c7ee57470d9e7317d6b577d613e317b5c16ec014f232ec68bc755e0eba7a975e'
+ '737953ab10027100b6bd03ca60a3f1cd4fff503c4c5a1689b3e12ef8df66a3e3347c99d498e48dccc3be8d00e9e37fcab56d5c97bbb81dd310ce757979aa0276'
+)
+
+build() {
+ cd Terasology-${_enginever}
+ gradle --gradle-user-home=. distForLauncher
+}
+
+check() {
+ cd Terasology-${_enginever}
+ gradle --gradle-user-home=. test
+}
+
+package() {
+ cd Terasology-${_enginever}
+ install -Dm 755 "${srcdir}/${pkgname}" "$pkgdir/usr/bin/${pkgname}"
+ install -Dm 644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+
+ cd build/distributions
+ unzip Terasology.zip
+
+ # extract and install icons
+ unzip -u libs/engine-* "org/terasology/icons/*"
+ pushd org/terasology/icons
+ for icon in *
+ do
+ size=${icon##*_} #gooey_sweet_XX.png -> XX.png
+ size=${size/.png/} #XX.png -> XX
+ install -Dm 644 "$icon" "${pkgdir}/usr/share/icons/${size}x${size}/apps/${pkgname}.png"
+ done
+ install -Dm 644 "${pkgdir}/usr/share/icons/64x64/apps/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
+ popd
+ rm -rv org
+
+ # add license
+ install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ # remove files/dirs for other operating systems
+ rm -v run_macosx.command Terasology.{x86,x64}.exe
+ rm -rv natives/{macosx,windows}
+
+ # remove/copy anything that's left
+ rm -v Terasology.zip LICENSE README NOTICE
+ cp -rav . "${pkgdir}/usr/share/${pkgname}"
+}
diff --git a/pcr/terasology/terasology b/pcr/terasology/terasology
new file mode 100755
index 000000000..aff3980be
--- /dev/null
+++ b/pcr/terasology/terasology
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec sh /usr/share/terasology/run_linux.sh
diff --git a/pcr/terasology/terasology.desktop b/pcr/terasology/terasology.desktop
new file mode 100644
index 000000000..a2f275370
--- /dev/null
+++ b/pcr/terasology/terasology.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Terasology
+GenericName=Terasology
+Comment=Yet another high resolution game with blocks...
+Exec=terasology
+Terminal=false
+Type=Application
+Icon=terasology
+Categories=Game;