summaryrefslogtreecommitdiffstats
path: root/corsix-th/APKBUILD
blob: bb9a4d846c8bddd20d422a29fd8728209ffd3335 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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"