summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Angelacos <nangel@alpinelinux.org>2018-05-06 15:44:08 -0400
committerNathan Angelacos <nangel@alpinelinux.org>2018-05-06 15:44:08 -0400
commit9c10abc6277749a59748bf49214a13c2d41c61fa (patch)
tree58d7e3f5ee0b65da61add54d7148f3df3d813362
parentca6edb7d91496b4d9acf0e28bf0d20a0c0408862 (diff)
downloadaports-9c10abc6277749a59748bf49214a13c2d41c61fa.tar.bz2
aports-9c10abc6277749a59748bf49214a13c2d41c61fa.tar.xz
Corsix-TH builds
-rw-r--r--corsixth/APKBUILD75
1 files changed, 75 insertions, 0 deletions
diff --git a/corsixth/APKBUILD b/corsixth/APKBUILD
new file mode 100644
index 0000000..bb9a4d8
--- /dev/null
+++ b/corsixth/APKBUILD
@@ -0,0 +1,75 @@
+# Maintainer: Nathan Angelacos <nangel@alpinelinux.org>
+pkgname=corsix-th
+pkgver=0.61
+pkgrel=0
+pkgdesc="Open Source clone of Theme Hospital"
+arch=all
+url="https://corsixth.com/"
+# License is based on Arch Linux
+# LICENSE.txt lists all the various licenses corsix-th uses
+license="MIT"
+
+_pkgname=CorsixTH
+
+depends=""
+makedepends="cmake lua5.3 lua5.3-dev lua5.3-filesystem \
+ lua5.3-lpeg freetype-dev \
+ sdl2-dev sdl2_image-dev sdl2_mixer-dev sdl2_ttf-dev \
+ ffmpeg-dev"
+install=
+#subpackages="$pkgname-dev"
+
+
+# If building from a git snapshot, specify the gitcommit
+# run "abuild snapshot", then abuild as normal
+# If building a proper release, leave gitcommit blank
+# _gitcommit=55869e8
+_giturl="git://github.com/$pkgname/$pkgname.git"
+_gittag=HEAD
+
+[ -z "${_gitcommit}" ] && _suffix="" || _suffix="-${_gitcommit}"
+
+source="$pkgname-$pkgver${_suffix}.tar.gz::https://github.com/$_pkgname/$_pkgname/archive/v${pkgver}.tar.gz\
+ "
+
+builddir="$srcdir"/$_pkgname-$pkgver
+
+snapshot() {
+ mkdir -p "$srcdir"
+ cd "${SRCDEST:-$srcdir}"
+ if ! [ -d $pkgname.git ]; then
+ git clone --bare $_giturl || return 1
+ cd $pkgname.git
+ else
+ cd $pkgname.git
+ git fetch || return 1
+ fi
+ git archive --prefix=$pkgname-$pkgver/ -o "$SRCDEST"/${_pkgname}-${pkgver}${_suffix}.tar.gz $_gittag
+}
+
+prepare() {
+
+ default_prepare || return 1
+ cd "$builddir"
+ mkdir -p build
+
+}
+
+build() {
+ cd "$builddir"/build
+ cmake \
+ -DLUA_INCLUDE_DIR=/usr/include/lua5.3 \
+ -DLUA_LIBRARY=/usr/lib/lua5.3/liblua-5.3.so.0 \
+ -DCMAKE_BUILD_TYPE=Release -Wno-dev \
+ -DCMAKE_INSTALL_PREFIX=/usr/share/ \
+ ..
+ make
+}
+
+package() {
+ cd "$builddir"/build
+ make DESTDIR="${pkgdir}" install
+}
+
+
+sha512sums="607b0d03e9780cc0f26d0b85b3278ab3d5064e8f4d997dab31de67e39cbadea7f088416fe7e069a9a2b327383a7dc875e8b965faf2eb13ba84a74afe7f5efcb7 corsix-th-0.61.tar.gz"