summaryrefslogtreecommitdiffstats
path: root/corsix-th
diff options
context:
space:
mode:
Diffstat (limited to 'corsix-th')
-rw-r--r--corsix-th/APKBUILD75
1 files changed, 75 insertions, 0 deletions
diff --git a/corsix-th/APKBUILD b/corsix-th/APKBUILD
new file mode 100644
index 0000000..bb9a4d8
--- /dev/null
+++ b/corsix-th/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"