summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e646585966ef97e25ed717c34006bd2b41d34798 (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
41
42
43
44
45
# Maintainer: redfish <redfish@galactica.pw>

pkgname=randomx
_name=RandomX
pkgver=1.1.10
pkgrel=2
pkgdesc="RandomX: The proof of work algorithm based on random code execution"
arch=('x86_64')
url="https://github.com/tevador/RandomX"
license=('BSD')
makedepends=('cmake')
source=("https://github.com/tevador/RandomX/archive/v${pkgver}.tar.gz"
        "include-cstdint.patch")

_blddir=build

prepare() {
	cd "$srcdir/${_name}-${pkgver}"
	patch -p1 -i ../include-cstdint.patch

	mkdir -p ${_blddir}
	cd ${_blddir}
	cmake ..
}

build() {
	cd "$srcdir/${_name}-${pkgver}"
	cd ${_blddir}
	make
}

check() {
	cd "$srcdir/${_name}-${pkgver}/${_blddir}"
	./randomx-tests
}

package() {
	cd "$srcdir/${_name}-${pkgver}/${_blddir}"
	make DESTDIR="$pkgdir/" install
	install -Dm755 "randomx-benchmark" "${pkgdir}/usr/bin/randomx-benchmark"
	install -Dm755 "randomx-codegen" "${pkgdir}/usr/bin/randomx-codegen"
}

sha256sums=('051cee65700a10adef84e7946416068bc805757683378a854a1b168ec18da783'
            '4196ae10b1e0600914282e28a25f0f48a9a87277d2275521d7885214af264dc4')