summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7ba91e9d8552c8d1c1d11b1b7c4da10c7f54b2da (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
# Maintainer: xiretza <xiretza+aur@xiretza.xyz>
# Contributor: Bruce Zhang

_pkgname=SPIRV-Headers
pkgname=spirv-headers-git
epoch=1
pkgver=1.3.280.0.r3.g4f7b471
pkgrel=1
pkgdesc='SPIR-V header files Git version'
arch=('any')
url='https://www.khronos.org/registry/spir-v/'
license=('custom')
source=("git+https://github.com/KhronosGroup/$_pkgname.git")
sha1sums=('SKIP')
makedepends=('git' 'cmake')
conflicts=('spirv-headers')
provides=("spirv-headers=1:$pkgver")

pkgver() {
    cd "$_pkgname"
	git describe --long --tags | sed 's/^[^0-9]*//; s/\([^-]*-g\)/r\1/; s/-/./g'
}

build() {
	cmake -B build -S "$_pkgname" \
		-DCMAKE_INSTALL_PREFIX=/usr
	make -C build
}

package() {
	make -C build DESTDIR="$pkgdir" install
	install -Dm644 "$_pkgname/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname"
}