summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ee45bdbc59d6816f2bca9e1d8a96b43acc3acfe4 (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
pkgname=openblack-git
pkgver=r1103.ac816c1
pkgrel=1
pkgdesc="Open source reimplementation of the game Black & White (2001)."
arch=('x86_64')
url="https://github.com/openblack/openblack"
license=('GPL3' 'MIT')

depends=('fmt' 'spdlog' 'entt' 'sdl2' 'glm' 'bgfx')
makedepends=('git' 'cmake' 'bgfx-cmake-git' 'cxxopts')
conflicts=("${pkgname%-git}")
provides=("${pkgname%-git}")

source=('git://github.com/openblack/openblack.git')
sha256sums=('SKIP')

prepare() {
  cd "${srcdir}/${pkgname%-git}"
  git submodule update --init externals/imgui
}

pkgver() {
  cd "${srcdir}/${pkgname%-git}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "${srcdir}/${pkgname%-git}"
  cmake -DCMAKE_INSTALL_PREFIX=/usr \
        -DOPENBLACK_USE_BUNDLED_BGFX=OFF \
        -DCMAKE_BUILD_TYPE=RelWithDebInfo
  cmake --build .
}

package() {
  cd "${srcdir}/${pkgname%-git}"
  cmake --install . -v --strip --prefix "$pkgdir/usr"
}

# vim:set ts=2 sw=2 et: