summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 21e93c434f481043d24e217327781bdaae863db0 (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
# Maintainer: Valerii Huz <ghotrix at gmail dot com>
pkgname=lc0-cudnn-git
_pkgname=lc0-cudnn
pkgver=0.30.0.r0.gee686691
pkgrel=1
pkgdesc="CudNN version of Leela Chess Zero."
arch=('i686' 'x86_64')
url="https://lczero.org/"
license=('GPL3')
depends=('cuda' 'cudnn' 'protobuf')
makedepends=('git' 'meson>=0.46' 'ninja')
source=("${_pkgname}::git+https://github.com/LeelaChessZero/lc0.git#branch=master")
md5sums=('SKIP')

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

prepare() {
    cd "${srcdir}/${_pkgname}"
    #git checkout $(git tag|grep -v rc|sort -rh|head -n 1)
    git checkout master
    git submodule update --init --recursive
}

build() {
    cd "${srcdir}/${_pkgname}"
    PATH=$PATH:/opt/cuda/bin ./build.sh release -Dblas=false -Dopencl=false || return 1
}

package() {
    cd "$srcdir/$_pkgname/build/release"
    install -Dm755 lc0 $pkgdir/usr/bin/lc0
}