summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 195ce5b19bca3a8a9a7415191baaee26bd86aa84 (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
# Maintainer: JackMacWindows <jackmacwindowslinux@gmail.com>
pkgname=craftos-pc-git
pkgver=2.5.2.0~931+0d60c4c
pkgrel=1
epoch=
pkgdesc="Advanced ComputerCraft emulator written in C++"
arch=('x86_64' 'i386' 'armv7l' 'aarch64')
url="https://github.com/MCJack123/craftos2"
license=('MIT')
groups=()
depends=('craftos-pc-data-git' 'sdl2>=2.0.8' 'sdl2_mixer' 'poco')
makedepends=()
optdepends=('libharu: PDF output support' 'png++: PNG screenshot support' 'ncurses: CLI mode support')
checkdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("craftos2::git+https://github.com/MCJack123/craftos2.git")
noextract=()
sha256sums=(SKIP)
validpgpkeys=()

prepare() {
    cd "craftos2"
    git submodule update --init --recursive
}

pkgver() {
    cd "craftos2"
    echo "$(grep -Po 'CRAFTOSPC_VERSION +\"v\K[^\"]+' src/util.hpp).0~$(git rev-list --count HEAD)+$(git rev-parse --short HEAD)"
}

build() {
	cd "craftos2"
    make -C craftos2-lua linux
	CPPFLAGS="-DCRAFTOSPC_COMMIT=\\\"$(git rev-parse --short HEAD)\\\"" ./configure --prefix=/usr/local
	make 
}

check() {
	cd "craftos2"
	make -k test
}

package() {
	cd "craftos2"
	mkdir -p "$pkgdir/usr/local/bin"
	DESTDIR="$pkgdir/usr/local/bin" make install
}