aboutsummaryrefslogtreecommitdiffstats
path: root/testing/xmrig/APKBUILD
blob: 314cf32c8fa5602c8da7a80e22754b0ef3079ae9 (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
# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>

pkgname=xmrig
pkgver=5.0.1
pkgrel=0
pkgdesc="XMRig is a high performance Monero (XMR) miner"
url="https://github.com/xmrig/xmrig"
arch="all !s390x !ppc64le !aarch64" # disable aarch64 as Drone CI get stalled
license="GPL-3.0-or-later"
options="!check" # No test suite from upstream
makedepends="cmake libmicrohttpd-dev libuv-dev openssl-dev hwloc-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/xmrig/xmrig/archive/v$pkgver.tar.gz"

case "$CARCH" in
	aarch64*) CMAKE_CROSSOPTS="-DARM_TARGET=8"; makedepends="$makedepends linux-headers" ;;
	armv7*)   CMAKE_CROSSOPTS="-DARM_TARGET=7"; makedepends="$makedepends linux-headers" ;;
	armhf*)   CMAKE_CROSSOPTS="-DARM_TARGET=7"; makedepends="$makedepends linux-headers" ;;
esac

build() {
	mkdir build
	cd build
	cmake .. ${CMAKE_CROSSOPTS}
	make
}

package() {
	install -Dm 755 build/xmrig $pkgdir/usr/bin/xmrig

	install -Dm 644 -t "$pkgdir"/usr/share/doc/$pkgname/ README.md
}

sha512sums="c03508bb643ec20bb70da5ed277c275183ff90c849a24609a14b08af6224f5b84454378e144b254eb8d60879c3af55ae36697ca83f445e910bfbf6b85a1f1ca9  xmrig-5.0.1.tar.gz"