summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7823e9b33522163979bee9a534c49bc29a7472bd (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
# Maintainer: Valeriy Huz <ghotrix@gmail.com>
pkgname='asmfish-git'
_pkgname=asmfish
pkgver=135
pkgrel=1
pkgdesc="Stockfish translated into assembly language."
arch=('i686' 'x86_64')
url="https://github.com/lantonov/asmFish"
license=('GPL2')
makedepends=('git' 'fasmg')
optdepends=('xboard' 'scid_vs_pc')
provides=('asmfish')
conflicts=('asmfish')
source=("${_pkgname}::git+https://github.com/lantonov/asmFish")
md5sums=('SKIP')

pkgver() {
    cd "${srcdir}/${_pkgname}"
    git rev-list --count HEAD
}

build() {
    cd "${srcdir}/${_pkgname}"
    fasmg "x86/fish.asm" "asmfish" -e 100 -i "VERSION_OS='L'" -i "VERSION_POST = 'popcnt'"
}

check() {
    cd "${srcdir}/${_pkgname}"
    chmod +x ./asmfish
    ./asmfish bench
}

package() {
    cd "${srcdir}/${_pkgname}"
    install -Dm755 asmfish $pkgdir/usr/bin/asmfish
}