summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: edc00cf9bee9e71e75e68f6a6a09aede4a000f68 (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
# Maintainer: Eric Engestrom <aur [at] engestrom [dot] ch>

pkgname=spirv-tools-git
pkgver=r1864.2af6ffae826426cff344
pkgrel=1
pkgdesc='API and commands for processing SPIR-V modules'
url='https://github.com/KhronosGroup/SPIRV-Tools'
arch=('i686' 'x86_64')
license=('custom')
groups=('vulkan-devel')
source=('git+https://github.com/KhronosGroup/SPIRV-Tools'
        'git+https://github.com/KhronosGroup/SPIRV-Headers')
sha1sums=('SKIP'
          'SKIP')
depends=(gcc-libs spirv-headers)
makedepends=('cmake' 'python' 'git')
options=('staticlibs')
conflicts=('spirv-tools')
provides=('spirv-tools')

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

build() {
  cd "${srcdir}"/SPIRV-Tools
  cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DSPIRV-Headers_SOURCE_DIR="${srcdir}/SPIRV-Headers" \
    -DSPIRV_WERROR=OFF
  make
}

package() {
  cd "${srcdir}"/SPIRV-Tools

  DESTDIR="${pkgdir}" make install

  # License
  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE
}