# Maintainer: Hans-Nikolai Viessmann pkgname=xmrig-cuda pkgver=6.15.0 pkgrel=4 pkgdesc='NVIDIA CUDA plugin for XMRig miner.' arch=('x86_64') url='https://github.com/xmrig/xmrig-cuda' depends=('xmrig>=6.15.0' 'cuda>=8.0') optdepends=('monero: wallet') makedepends=('cmake' 'openssl' 'cuda>=8.0') license=('GPL') source=("${url}/archive/v${pkgver}.tar.gz" 'fix-compile.patch') sha256sums=('64c440a4cb439f3cc8120f1883274158f95df988ab91eccb1d2d2abf0bedbbfe' '3d545c3947e270a127caa0c33ffa84025b1ef2d51251a4d0b028a47a775b78e2') prepare () { cd "${pkgname}-${pkgver}" patch -p1 < ${srcdir}/fix-compile.patch } build() { cd "${pkgname}-${pkgver}" cmake -DCMAKE_C_COMPILER=/opt/cuda/bin/gcc -DCMAKE_CXX_COMPILER=/opt/cuda/bin/g++ -S . -B build cmake --build build } package() { cd "${pkgname}-${pkgver}" install -Dm644 "build/libxmrig-cuda.so" "${pkgdir}/usr/lib/libxmrig-cuda.so" install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md" }