# Contributor: Oleg Titov # Maintainer: Oleg Titov pkgname=xmrig pkgver=3.1.3 pkgrel=0 pkgdesc="XMRig is a high performance Monero (XMR) miner" url="https://github.com/xmrig/xmrig" arch="all !s390x !ppc64le" 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="995b112115fd8737d05b75f80ab1acde9592677b4dae502f182a2a6333fcf6c0b6b9e31d4d60e6b8104b4a5739db419f61fb1f46b242f8b3a8a935a9480f5fc2 xmrig-3.1.3.tar.gz"