summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Petrescu2018-11-28 09:26:32 -0500
committerAdrian Petrescu2018-11-28 09:26:32 -0500
commit586461b512d0397f6ac920ea5676c42d58f8b6aa (patch)
tree4db83b4f90c87c05091c8c7675395308810ec495
parent248f56750fb57090096062816e7a3d2ae9ecaeee (diff)
downloadaur-586461b512d0397f6ac920ea5676c42d58f8b6aa.tar.gz
pkgrel 3: packaging improvements
Implemented some nice refactorings suggested by algebro
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD32
-rw-r--r--leela-zero.install4
3 files changed, 31 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c17c432918f0..b5fca3b9284b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = leela-zero
pkgdesc = Go engine with no human-provided knowledge, modeled after the AlphaGo Zero paper.
pkgver = 0.16
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/gcp/leela-zero
install = leela-zero.install
arch = x86_64
@@ -12,11 +12,17 @@ pkgbase = leela-zero
makedepends = ocl-icd
depends = glibc
depends = zlib
- depends = libopenblas
+ depends = openblas
depends = boost
depends = opencl-nvidia
depends = qt5-base
source = leela-zero::git+https://github.com/gcp/leela-zero#tag=v0.16
+ source = git+https://github.com/google/googletest.git
+ source = git+https://github.com/eigenteam/eigen-git-mirror
+ source = weights.txt.gz::http://zero.sjeng.org/best-network
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = SKIP
md5sums = SKIP
pkgname = leela-zero
diff --git a/PKGBUILD b/PKGBUILD
index d23b2cc9080d..704e143ee102 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,29 +1,39 @@
# Maintainer: Adrian Petrescu <apetresc at gmail dot com>
+# Contributor: algebro <algebro at tuta dot io>
+
pkgname=leela-zero
pkgver=0.16
-pkgrel=2
+pkgrel=3
pkgdesc="Go engine with no human-provided knowledge, modeled after the AlphaGo Zero paper."
arch=('x86_64')
url="https://github.com/gcp/leela-zero"
license=('GPLv3')
-depends=('glibc' 'zlib' 'libopenblas' 'boost' 'opencl-nvidia' 'qt5-base')
+depends=('glibc' 'zlib' 'openblas' 'boost' 'opencl-nvidia' 'qt5-base')
makedepends=('git' 'opencl-headers' 'cmake' 'ocl-icd')
install="$pkgname.install"
-source=("${pkgname}::git+https://github.com/gcp/leela-zero#tag=v${pkgver}")
-md5sums=('SKIP')
+source=("${pkgname}::git+https://github.com/gcp/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
- curl http://zero.sjeng.org/best-network | gunzip > weights_${pkgver}.txt
+ 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
- git submodule update --init --recursive
- mkdir -p build && cd build
- cmake .. || return 1
+ cd $srcdir/$pkgname/build
+ cmake ..
make leelaz
- cd ../autogtp
+ cd $srcdir/$pkgname/autogtp
qmake
make
}
@@ -38,5 +48,5 @@ package() {
cd $srcdir/$pkgname
install -Dm755 build/leelaz $pkgdir/usr/bin/leelaz
install -Dm755 autogtp/autogtp $pkgdir/usr/bin/autogtp
- install -Dm644 weights_$pkgver.txt $pkgdir/usr/share/leela-zero/networks/weights_$pkgver.txt
+ install -Dm644 $srcdir/weights.txt $pkgdir/usr/share/leela-zero/networks/weights.txt
}
diff --git a/leela-zero.install b/leela-zero.install
index 74e8362e8ce4..b0c808e7dc7f 100644
--- a/leela-zero.install
+++ b/leela-zero.install
@@ -1,12 +1,12 @@
post_install() {
echo ""
echo "leela-zero has downloaded the currently-best network to "
- echo " /usr/share/leela-zero/networks/weights_$1.txt "
+ echo " /usr/share/leela-zero/networks/weights.txt "
echo ""
echo "You can find the new best network at any moment at: "
echo " http://zero.sjeng.org/best-network "
echo ""
echo "A network must be passed in when running leelaz, like: "
- echo " leelaz -w /usr/share/leela-zero/networks/weights_$1.txt"
+ echo " leelaz -w /usr/share/leela-zero/networks/weights.txt "
echo ""
}