From 637c8a1cd5d0bd9eda5489b5b7f5561accf04a77 Mon Sep 17 00:00:00 2001 From: Helmut Pozimski Date: Fri, 22 Sep 2017 20:20:36 +0200 Subject: [PATCH] New package: monero-0.11.0.0 Closes: #7779 [via git-merge-pr] --- srcpkgs/monero/files/monerod/run | 2 + srcpkgs/monero/patches/easylogging.patch | 11 ++++++ srcpkgs/monero/patches/march_cross.patch | 11 ++++++ srcpkgs/monero/template | 48 ++++++++++++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 srcpkgs/monero/files/monerod/run create mode 100644 srcpkgs/monero/patches/easylogging.patch create mode 100644 srcpkgs/monero/patches/march_cross.patch create mode 100644 srcpkgs/monero/template diff --git a/srcpkgs/monero/files/monerod/run b/srcpkgs/monero/files/monerod/run new file mode 100644 index 00000000000..0d120dc8afe --- /dev/null +++ b/srcpkgs/monero/files/monerod/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u monero:monero /usr/bin/monerod --config-file /etc/monerod.conf diff --git a/srcpkgs/monero/patches/easylogging.patch b/srcpkgs/monero/patches/easylogging.patch new file mode 100644 index 00000000000..633708d5668 --- /dev/null +++ b/srcpkgs/monero/patches/easylogging.patch @@ -0,0 +1,11 @@ +--- external/easylogging++/easylogging++.h ++++ external/easylogging++/easylogging++.h +@@ -195,7 +195,7 @@ + # define ELPP_INTERNAL_INFO(lvl, msg) + #endif // (defined(ELPP_DEBUG_INFO)) + #if (defined(ELPP_FEATURE_ALL)) || (defined(ELPP_FEATURE_CRASH_LOG)) +-# if (ELPP_COMPILER_GCC && !ELPP_MINGW) ++# if (__has_include() && ELPP_COMPILER_GCC && !ELPP_MINGW) + # define ELPP_STACKTRACE 1 + # else + # define ELPP_STACKTRACE 0 diff --git a/srcpkgs/monero/patches/march_cross.patch b/srcpkgs/monero/patches/march_cross.patch new file mode 100644 index 00000000000..1c086feee41 --- /dev/null +++ b/srcpkgs/monero/patches/march_cross.patch @@ -0,0 +1,11 @@ +--- CMakeLists.txt 2017-09-22 19:22:04.735657685 +0200 ++++ CMakeLists.txt 2017-09-22 19:20:08.164169125 +0200 +@@ -388,7 +388,7 @@ + include(TestCXXAcceptsFlag) + set(ARCH native CACHE STRING "CPU to build for: -march value or 'default' to not pass -march at all") + message(STATUS "Building on ${CMAKE_SYSTEM_PROCESSOR} for ${ARCH}") ++ if(ARCH STREQUAL "default" OR CMAKE_CROSSCOMPILING) +- if(ARCH STREQUAL "default") + set(ARCH_FLAG "") + elseif(PPC64LE) + set(ARCH_FLAG "-mcpu=${ARCH}") diff --git a/srcpkgs/monero/template b/srcpkgs/monero/template new file mode 100644 index 00000000000..b079b165591 --- /dev/null +++ b/srcpkgs/monero/template @@ -0,0 +1,48 @@ +# Template file for 'monero' +pkgname=monero +version=0.11.0.0 +revision=1 +conf_files="/etc/monerod.conf" +build_style=cmake +hostmakedepends="pkg-config" +configure_args="-DBUILD_GUI_DEPS=ON -DHAVE_LIBRESSL=1" +makedepends="libressl-devel boost-devel libldns-devel libunwind-devel + readline-devel unbound-devel miniupnpc-devel libldns-devel expat-devel" +system_accounts="monero" +make_dirs=" + /var/lib/monero 0750 monero monero + /var/log/monero 0755 monero monero" +short_desc="Private, secure, untraceable, decentralised digital currency" +maintainer="Helmut Pozimski " +license="3-clause-BSD" +homepage="https://getmonero.org" +distfiles="https://github.com/monero-project/monero/archive/v${version}.tar.gz" +checksum=93c217cf10624d6e93cd1db5d137310be8b23393400014e2c8808d5214207c20 + +if [ "$CROSS_BUILD" ]; then + configure_args+=" -DTHREADS_PTHREAD_ARG=OFF" +fi + +case "$XBPS_TARGET_MACHINE" in + armv7*) configure_args+=" -DARCH=armv7" + ;; + armv6*) configure_args+=" -DARCH=armv6" + ;; + aarch64*) configure_args+=" -DARCH=aarch64" + ;; + *) configure_args+=" -DARCH=default" + ;; +esac + +do_install() { + vbin build/bin/monerod + vbin build/bin/monero-wallet-cli + vbin build/bin/monero-blockchain-import + vbin build/bin/monero-blockchain-export + vinstall utils/conf/monerod.conf 644 etc + vsv monerod +} + +post_install() { + vlicense LICENSE +}