summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9cf0e8328b9257958db62222bee3dc593aa817d5 (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
45
46
47
48
49
50
51
52
# Maintainer: Adrian Petrescu <apetresc at gmail dot com>
# Contributor: algebro <algebro at tuta dot io>

pkgname=leela-zero
pkgver=0.17
pkgrel=1
pkgdesc="Go engine with no human-provided knowledge, modeled after the AlphaGo Zero paper."
arch=('x86_64')
url="https://github.com/leela-zero/leela-zero"
license=('GPLv3')
depends=('glibc' 'zlib' 'openblas' 'boost' 'opencl-driver' 'qt5-base')
makedepends=('git' 'opencl-headers' 'cmake' 'ocl-icd')
install="$pkgname.install"
source=("${pkgname}::git+https://github.com/leela-zero/leela-zero#tag=v${pkgver}"
        "git+https://github.com/google/googletest.git"
        "git+https://github.com/eigenteam/eigen-git-mirror"
        "weights.txt.gz::http://zero.sjeng.org/best-network")
md5sums=('SKIP'
         'SKIP'
         'SKIP'
         'SKIP')

prepare() {
  cd $srcdir/$pkgname
  git submodule init
  git config submodule.gtest.url "$srcdir"/googletest
  git config submodule.src/Eigen.url "$srcdir"/eigen-git-mirror
  git submodule update gtest src/Eigen
  mkdir -p build
}

build() {
  cd $srcdir/$pkgname/build
  cmake ..
  make leelaz
  cd $srcdir/$pkgname/autogtp
  qmake
  make
}

check() {
  cd $srcdir/$pkgname/build
  make tests
  ./tests
}

package() {
  cd $srcdir/$pkgname
  install -Dm755 build/leelaz $pkgdir/usr/bin/leelaz
  install -Dm755 autogtp/autogtp $pkgdir/usr/bin/autogtp
  install -Dm644 $srcdir/weights.txt $pkgdir/usr/share/leela-zero/networks/weights.txt
}