summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 637bc9600f7ae1ae1175ebcb143e95d5c5b56747 (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
# Maintainer: Tod Jackson <tod.jackson@gmail.com>
# Contributor: Özgür Sarıer <echo b3pndXJzYXJpZXIxMDExNjAxMTE1QGdtYWlsLmNvbQo= | base64 -d>
# Contributor: user6553591 <Message on Reddit>
# Contributor: P. Badredin <p dot badredin at gmail dot com>
# Contributor: Justin Blanchard <UncombedCoconut at gmail dot com>
# Contributor: Auguste Pop < auguste [at] gmail [dot] com >

pkgname=stockfish
pkgver=11
pkgrel=1
epoch=1
pkgdesc="A strong chess engine written by Tord Romstad, Marco Costalba, Joona Kiiski"
arch=('i686' 'x86_64' 'armv7')
url="https://stockfishchess.org/"
license=('GPL3')
depends=('glibc')
source=("https://stockfishchess.org/files/$pkgname-$pkgver-linux.zip")
sha512sums=('f1505814d143e319a748ff7a0abe58ca37481aefdfaaab762b3efeff216294201e085b015b614e44369c7a55de1bbf6e18a0183230c02bdd2fd4945719aeca3d')

build() {
    cd "$pkgname-$pkgver-linux/src"
    if [[ "$CARCH" == "i686" ]]; then
        _arch=x86-32
    elif grep popcnt /proc/cpuinfo 2>&1; then
        _arch=x86-64-modern
    elif grep bmi2 /proc/cpuinfo 2>&1; then
        _arch=x86-64-bmi2
    elif [[ "$CARCH" == "armv7h" ]]; then
    _arch=armv7
    else
	_arch=x86-64
    fi
    
    make build ARCH="$_arch" COMP=gcc
}

package() {
    cd "$pkgname-$pkgver-linux/src"
    make PREFIX="$pkgdir/usr" install
}