summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5f6cbac20dc374c2e3e9bd42f81507f63576a339 (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: txtsd <aur.archlinux@ihavea.quest>

pkgname=openkeeper-git
_pkgname=OpenKeeper
pkgver=r2701.0923a080
pkgrel=1
pkgdesc='An open source remake of the Dungeon Keeper II game and engine.'
arch=(any)
url='https://github.com/tonihele/OpenKeeper'
license=('GPL-3.0-or-later')
depends=(
  'java-runtime>=21'
  bash
  hicolor-icon-theme
)
makedepends=(
  'java-environment>=21'
  git
  gradle
)
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=(
  'git+https://github.com/tonihele/OpenKeeper'
  "${_pkgname}.desktop"
)
sha256sums=('SKIP'
            '035182dfb1269e3fad55f273928ec323ed99da78c403d1e839f7b32cf15cc0b1')

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

build() {
  cd "${_pkgname}"

  gradle clean build
}

package() {
  cd "${_pkgname}"

  install -dm755 "${pkgdir}/usr/bin"
  install -dm755 "${pkgdir}/opt"

  bsdtar -xf "build/distributions/${_pkgname}.tar" -C "${pkgdir}/opt"
  ln -s "/opt/${_pkgname}/bin/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"

  install -Dm644 "${srcdir}/${_pkgname}.desktop" "${pkgdir}/usr/share/applications/${_pkgname}.desktop"
  install -Dm644 assets/Icons/openkeeper.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${_pkgname}.svg"

}