From 0dda9e87933e991662557b9ad05c545b2608606d Mon Sep 17 00:00:00 2001 From: Kevin Crumb Date: Thu, 5 Nov 2020 10:35:54 +0000 Subject: [PATCH] randomx: add package v1.1.8 and librandomx --- srcpkgs/librandomx/template | 33 +++++++++++++++++++++++++++++++++ srcpkgs/randomx/template | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 srcpkgs/librandomx/template create mode 100644 srcpkgs/randomx/template diff --git a/srcpkgs/librandomx/template b/srcpkgs/librandomx/template new file mode 100644 index 00000000000..7112e8846ae --- /dev/null +++ b/srcpkgs/librandomx/template @@ -0,0 +1,33 @@ +# Template file for 'librandomx' +pkgname=librandomx +version=1.1.8 +revision=2 +short_desc="Proof of work algorithm based on random code execution - Libraries" +maintainer="Kevin Crumb " +license="BSD-3-Clause" +homepage="https://github.com/tevador/randomx" +build_style=cmake +makedepends="cmake gcc" +distfiles="https://github.com/tevador/RandomX/archive/v${version}.tar.gz" +checksum="f982a12d18b1d260bef2a1d3c46ae4902975fbf63abb38ca6413c96d1778db3a" + +case "$XBPS_TARGET_MACHINE" in + armv7*) configure_args+=" -DARCH=armv7" ;; + armv6*) configure_args+=" -DARCH=armv6" ;; + armv5*) configure_args+=" -DARCH=armv5" ;; + aarch64*) configure_args+=" -DARCH=aarch64" ;; + mips*) configure_args+=" -DARCH=mipsr32 -DNO_AES=ON" ;; + ppc64le*) configure_args+=" -DARCH=ppc64le" ;; + ppc64*) configure_args+=" -DARCH=ppc64" ;; + ppc*) configure_args+=" -DARCH=ppc" ;; +# *) configure_args+=" -DARCH=native" ;; +esac + +post_extract() { + mv builddir/RandomX-${version} builddir/librandomx-${version} +} + +post_install() { + vlicense LICENSE + vinstall build/librandomx.a 644 usr/lib/ +} diff --git a/srcpkgs/randomx/template b/srcpkgs/randomx/template new file mode 100644 index 00000000000..0ab1205f95b --- /dev/null +++ b/srcpkgs/randomx/template @@ -0,0 +1,36 @@ +# Template file for 'randomx' +pkgname=randomx +version=1.1.8 +revision=2 +short_desc="Proof of work algorithm based on random code execution" +maintainer="Kevin Crumb " +license="BSD-3-Clause" +homepage="https://github.com/tevador/randomx" +build_style=cmake +makedepends="cmake gcc" +depends="librandomx" +distfiles="https://github.com/tevador/RandomX/archive/v${version}.tar.gz" +checksum="f982a12d18b1d260bef2a1d3c46ae4902975fbf63abb38ca6413c96d1778db3a" + +case "$XBPS_TARGET_MACHINE" in + armv7*) configure_args+=" -DARCH=armv7" ;; + armv6*) configure_args+=" -DARCH=armv6" ;; + armv5*) configure_args+=" -DARCH=armv5" ;; + aarch64*) configure_args+=" -DARCH=aarch64" ;; + mips*) configure_args+=" -DARCH=mipsr32 -DNO_AES=ON" ;; + ppc64le*) configure_args+=" -DARCH=ppc64le" ;; + ppc64*) configure_args+=" -DARCH=ppc64" ;; + ppc*) configure_args+=" -DARCH=ppc" ;; +# *) configure_args+=" -DARCH=native" ;; +esac + +post_extract() { + mv builddir/RandomX-${version} builddir/randomx-${version} +} + +post_install() { + vlicense LICENSE + vbin build/randomx-benchmark + vbin build/randomx-codegen + vbin build/randomx-tests +}