summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 755473d3893d355f9581a0b7cc2aca9b8724fb7a (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: bouanto <bouanto at zoho dot com>
pkgname=fairy-stockfish-default-git
pkgver=r6520.8549ed1d
pkgrel=1
pkgdesc="A chess engine derived from Stockfish designed for the support of fairy chess variants and easy extensibility with more games (compiled without largeboards=yes all=yes and with armv8 support)."
arch=('i686' 'x86_64' 'aarch64')
url="https://github.com/ianfab/Fairy-Stockfish"
license=('GPL3')
makedepends=('git')
optdepends=('polyglot-winboard: For xboard support')
conflicts=('fairy-stockfish-git' 'fairy-stockfish')
source=("$pkgname::git+$url")
md5sums=('SKIP')

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

prepare() {
	cd "$srcdir/$pkgname/src"
	sed -i 's/^EXE = stockfish$/EXE = fairy-stockfish/' Makefile
}

build() {
	[[ $CARCH = 'aarch64' ]] && build_arch="armv8" || build_arch="x86-64"
	cd "$srcdir/$pkgname/src"
	make build ARCH=$build_arch
}

package() {
	cd "$srcdir/$pkgname/src"
	make PREFIX="$pkgdir/usr" install
	install -D -m644 ../Copying.txt $pkgdir/usr/share/licenses/${pkgname%-*}/LICENSE
}