python-texttable: update to 1.3.1
[void-packages.git] / srcpkgs / monero / template
blob41efa71065bc5f9d68be4721fe1269ff62160299
1 # Template file for 'monero'
2 pkgname=monero
3 version=0.12.1.0
4 revision=1
5 conf_files="/etc/monerod.conf"
6 build_style=cmake
7 hostmakedepends="pkg-config qt5-host-tools"
8 configure_args="-DBUILD_GUI_DEPS=ON -DHAVE_LIBRESSL=1"
9 makedepends="libressl-devel boost-devel libldns-devel libunwind-devel
10  readline-devel unbound-devel miniupnpc-devel libldns-devel expat-devel
11  cppzmq czmq-devel"
12 system_accounts="monero"
13 make_dirs="
14  /var/lib/monero 0750 monero monero
15  /var/log/monero 0755 monero monero"
16 short_desc="Private, secure, untraceable, decentralised digital currency"
17 maintainer="Helmut Pozimski <helmut@pozimski.eu>"
18 license="BSD-3-Clause"
19 homepage="https://getmonero.org"
20 distfiles="https://github.com/monero-project/monero/archive/v${version}.tar.gz"
21 checksum=e5f32361ce39a9849a262afb1d5ce211f593c486dcca7bb0af60fcc26ee52b35
23 if [ "$CROSS_BUILD" ]; then
24         configure_args+=" -DTHREADS_PTHREAD_ARG=OFF"
27 case "$XBPS_TARGET_MACHINE" in
28         armv7*) configure_args+=" -DARCH=armv7"
29         ;;
30         armv6*) configure_args+=" -DARCH=armv6"
31                 makedepends+=" libatomic-devel"
32                 CFLAGS+=" -latomic"
33         ;;
34         armv5*) configure_args+=" -DARCH=armv5"
35                 makedepends+=" libatomic-devel"
36                 CFLAGS+=" -latomic"
37         ;;
38         aarch64*) configure_args+=" -DARCH=aarch64"
39         ;;
40         mips*) configure_args+=" -DARCH=mipsr32 -DNO_AES=ON"
41                 makedepends+=" libatomic-devel"
42                 CFLAGS+=" -latomic"
43         ;;
44         *) configure_args+=" -DARCH=default"
45         ;;
46 esac
48 pre_configure() {
49         case "$XBPS_TARGET_MACHINE" in
50         armv[56]*|mips*) sed -i CMakeLists.txt \
51                 -e '/include(version.cmake)/i list(APPEND EXTRA_LIBRARIES libatomic.a)'
52                 ;;
53         esac
56 pre_build() {
57         if [ -n "$CROSS_BUILD" ]; then
58                 # The generate_translations_header binary is executed during the build
59                 # but is not included in the binary package. It thus needs to be
60                 # built for the host
61                 CC=${CC_host} CFLAGS="${XBPS_CFLAGS}" LDFLAGS="${XBPS_LDFLAGS}" \
62                         make -C build ${makejobs} generate_translations_header
63         fi
66 post_install() {
67         vlicense LICENSE
68         vbin build/bin/monero-blockchain-import
69         vbin build/bin/monero-blockchain-export
70         vinstall utils/conf/monerod.conf 644 etc
71         vsv monerod
74 monero-devel_package() {
75         short_desc+=" - development files"
76         pkg_install() {
77                 vlicense LICENSE
78                 vmove usr/include
79                 vmove "usr/lib/*.a"
80         }