summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0e7ff32e00b0bd2752968d55232ce41ab95e09ff (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
# Maintainer: aksr <aksr at t-com dot me>
pkgname=fairy-stockfish-git
pkgver=r6550.b8274a7a
pkgrel=1
pkgdesc='A chess engine derived from Stockfish designed for the support of fairy chess variants and easy extensibility with more games.'
arch=('i686' 'x86_64')
url='https://github.com/ianfab/Fairy-Stockfish'
license=('GPL3')
makedepends=('git')
optdepends=('polyglot-winboard: For xboard support')
conflicts=("${pkgname%-*}")
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() {
	cd "$srcdir/$pkgname/src"
	make build ARCH=x86-64 largeboards=yes all=yes
}

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