diff options
author | Valeriy Huz | 2018-04-23 00:09:08 +0300 |
---|---|---|
committer | Valeriy Huz | 2018-04-23 00:09:08 +0300 |
commit | 963815410ad5c6de6006c9e92e6fed30a2c9ed58 (patch) | |
tree | cc2b9b23f5f28139306d8ed191298e10968209ca | |
download | aur-963815410ad5c6de6006c9e92e6fed30a2c9ed58.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 41 |
2 files changed, 63 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..bc2c7106943d --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = lczero-nvidia-git + pkgdesc = This is an adaptation of GCP's Leela Zero repository to chess, using Stockfish's position representation and move generation. + pkgver = 0.7 + pkgrel = 170 + url = https://github.com/glinscott/leela-chess + arch = i686 + arch = x86_64 + license = GPLv3 + makedepends = git + makedepends = opencl-headers + makedepends = cmake + makedepends = ocl-icd + depends = glibc + depends = zlib + depends = libopenblas + depends = boost + depends = opencl-nvidia + source = leela-chess::git+https://github.com/glinscott/leela-chess + md5sums = SKIP + +pkgname = lczero-nvidia-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7a9ede87d06b --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Valerii Huz <ghotrix at gmail dot com> +pkgname=lczero-nvidia-git +_pkgname=leela-chess +pkgver=0.7 +pkgrel=170 +pkgdesc="This is an adaptation of GCP's Leela Zero repository to chess, using Stockfish's position representation and move generation." +arch=('i686' 'x86_64') +url="https://github.com/glinscott/leela-chess" +license=('GPLv3') +depends=('glibc' 'zlib' 'libopenblas' 'boost' 'opencl-nvidia') +makedepends=('git' 'opencl-headers' 'cmake' 'ocl-icd') +source=("${_pkgname}::git+https://github.com/glinscott/leela-chess") +md5sums=('SKIP') + +prepare() { + cd ${srcdir}/${_pkgname} + wget http://lczero.org/get_network?sha=03b4813fe064064bd106e9a2c15ebc606503efc5ed717ba6255372206e48ddfe -O weights_$pkgrel.txt + echo '#!/bin/bash' > lczero + echo "/usr/bin/lczero-bin -w /usr/share/weights_$pkgrel.txt" >> lczero +} + +build() { + cd ${srcdir}/${_pkgname} + git submodule update --init --recursive + mkdir -p build && cd build + cmake .. || return 1 + make clean || return 1 + make -j3 || return 1 +} + +check() { + cd $srcdir/$_pkgname/build + ./tests +} + +package() { + cd "$srcdir/$_pkgname" + install -Dm755 build/lczero $pkgdir/usr/bin/lczero-bin + install -Dm755 lczero $pkgdir/usr/bin/lczero + install -Dm644 weights_$pkgrel.txt $pkgdir/usr/share/weights_$pkgrel.txt +} |