summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5b6415ba11013f2fdaec29e81a9d4d471ad369f7 (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
# Maintainer: Arthur LAURENT <arthur.laurent@gmail.com>

pkgname=nzsl-git
pkgver=r384.45e5c43
pkgrel=3
pkgdesc="A shader language inspired by Rust and C++ which compiles to GLSL or SPIRV (without any additional dependency)"
arch=('i686' 'x86_64' 'armv7h' 'aarch64')
url="https://github.com/NazaraEngine/ShaderLang"
license=('MIT')
options=()
provides=('nzsl' 'nzsl-debug')
depends=('gcc-libs' 'glibc')
makedepends=('xmake' 'fast_float' 'git')

source=("git+https://github.com/NazaraEngine/ShaderLang.git#branch=main")

sha256sums=('SKIP')

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

prepare() {
   cd "${srcdir}/ShaderLang"
   xmake f -k shared -m releasedbg --tests=y --examples=n --yes $XMAKECONFIGUREFLAGS
}

build() {
   cd "${srcdir}/ShaderLang"
   xmake b $XMAKEBUILDFLAGS
}

check() {
   cd "${srcdir}/ShaderLang"
   xmake run UnitTests
}

package() {
   cd "${srcdir}/ShaderLang"
   xmake install --root -o "${pkgdir}/usr" nzslc
   install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}