From c0ad45b839456c2af30ff75463b686825d078ca7 Mon Sep 17 00:00:00 2001 From: Kevin Crumb Date: Thu, 5 Nov 2020 10:44:00 +0000 Subject: [PATCH] csminer-git: add v0.2.0 and librandomx-go-git --- srcpkgs/csminer-git/files/correct-paths.patch | 13 ++++++ srcpkgs/csminer-git/template | 43 +++++++++++++++++++ srcpkgs/librandomx-go-git/template | 26 +++++++++++ 3 files changed, 82 insertions(+) create mode 100644 srcpkgs/csminer-git/files/correct-paths.patch create mode 100644 srcpkgs/csminer-git/template create mode 100644 srcpkgs/librandomx-go-git/template diff --git a/srcpkgs/csminer-git/files/correct-paths.patch b/srcpkgs/csminer-git/files/correct-paths.patch new file mode 100644 index 00000000000..4dc5a288725 --- /dev/null +++ b/srcpkgs/csminer-git/files/correct-paths.patch @@ -0,0 +1,13 @@ +--- a/rx/rx.go ++++ b/rx/rx.go +@@ -4,8 +4,8 @@ + // Package rx provides Go access to various randomx library methods. + package rx + +-// #cgo CFLAGS: -std=c11 -D_GNU_SOURCE -m64 -O3 -I${SRCDIR}/../../rxlib/ +-// #cgo LDFLAGS: -L${SRCDIR}/../../rxlib/ -Wl,-rpath,$ORIGIN ${SRCDIR}/../../rxlib/rxlib.cpp.o -lrandomx -lstdc++ -lm ++// #cgo CFLAGS: -std=c11 -D_GNU_SOURCE -m64 -O3 -I$/usr/include/ ++// #cgo LDFLAGS: -L/usr/lib/ -Wl,-rpath,$ORIGIN /usr/lib/rxlib.cpp.o -lrandomx -lstdc++ -lm + /* + #include + #include "rxlib.h" diff --git a/srcpkgs/csminer-git/template b/srcpkgs/csminer-git/template new file mode 100644 index 00000000000..3bf4b0427b4 --- /dev/null +++ b/srcpkgs/csminer-git/template @@ -0,0 +1,43 @@ +# Template file for 'csminer' +pkgname=csminer +version=0.2.0 +revision=1 +short_desc="Easy-to-use CPU miner for Monero" +maintainer="Kevin Crumb " +license="GPL-3.0-or-later" +homepage="https://cryptonote.social" +#distfiles="https://cryptonote.social/static/csminer/csminer-${version}-linux.tgz" +#checksum=f0ce530d82bae0dba8b488d885dc6fdfbb8219bd24e9298986db2ca9291b6c21 +#build_style=go +#go_import_path="github.com/cryptonote-social/csminer" +hostmakedepends="git go" +makedepends="librandomx librandomx-go-git" +#go_get=yes +#create_wrksrc=yes + + +do_fetch() { + git clone https://github.com/cryptonote-social/csminer csminer-${version} + cd csminer-${version} && git checkout 4eafaa9b65155747c856c57e5a4ed216212499d4 +} + +do_patch() { + cd rx && patch -i ${FILESDIR}/correct-paths.patch && cd .. +} + +do_build() { + go get github.com/cryptonote-social/csminer/blockchain + go get github.com/cryptonote-social/csminer/crylog + go get github.com/cryptonote-social/csminer/stratum/client + go get github.com/godbus/dbus + + mkdir -p /tmp/go/src/github.com/cryptonote-social/csminer/rx/../../rxlib/ + cp /usr/lib/rxlib.cpp.o /tmp/go/src/github.com/cryptonote-social/csminer/rx/../../rxlib/ + go get github.com/cryptonote-social/csminer/minerlib + + cd linux && go build -a -buildmode=pie csminer.go +} + +do_install() { + vinstall linux/csminer 755 usr/bin +} diff --git a/srcpkgs/librandomx-go-git/template b/srcpkgs/librandomx-go-git/template new file mode 100644 index 00000000000..5a909de77da --- /dev/null +++ b/srcpkgs/librandomx-go-git/template @@ -0,0 +1,26 @@ +# Template file for 'librandomx-go-git' +pkgname=librandomx-go-git +version=1.1.8 +revision=4 +short_desc="Wrapper for working with RandomX from Go applications" +maintainer="Kevin Crumb " +license="BSD-3-Clause" +homepage="https://github.com/cryptonote-social/RandomX" +hostmakedepends="pkg-config git" + +do_fetch() { + git clone git://github.com/cryptonote-social/RandomX.git $wrksrc + cd $wrksrc + git reset --hard 0ff2e9af8c122df9f234e509c99bfa5fa33a9fa4 +} + +do_build() { + cd rxlib + CFLAGS="-std=c++11 -D_GNU_SOURCE -fPIC -I../src -O3" + c++ $CFLAGS -c rxlib.cpp -o rxlib.cpp.o +} + +do_install() { + vinstall rxlib/rxlib.cpp.o 644 usr/lib/ + vinstall rxlib/rxlib.h 644 usr/include/ +}