summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8412c8161f9c46b93dd8343394b9cd443ae1ee6a (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
# Maintainer: robertfoster

pkgname=devilutionx-graphics-tools-git
pkgver=1.2.0.r4.ae39773
pkgrel=1
pkgdesc="DevilutionX graphics format conversion tools (git version)"
arch=('armv6h' 'armv7h' 'arm' 'aarch64' 'i686' 'x86_64')
url="https://github.com/diasurgical/devilutionx-graphics-tools"
license=('custom:unlicense')
depends=('fmt')
makedepends=('git' 'cmake' 'ninja')
conflicts=("${pkgname%-git}")
provides=("${pkgname%-git}")
source=("${pkgname%-git}::git+${url}")
sha256sums=('SKIP')

pkgver() {
  cd "${pkgbase%-git}"
  printf "%s" "$(git describe --tags | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}

build() {
  cd "${pkgname%-git}"

  cmake -S. -Bbuild-rel -G Ninja \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX="/usr"

  cmake --build build-rel -j "$(getconf _NPROCESSORS_ONLN)"
}

package() {
  cd "${pkgname%-git}"
  DESTDIR="${pkgdir}" \
    cmake --install build-rel
}