82 lines
2.2 KiB
Bash
82 lines
2.2 KiB
Bash
# Template file for 'monero'
|
|
pkgname=monero
|
|
version=0.12.0.0
|
|
revision=2
|
|
conf_files="/etc/monerod.conf"
|
|
build_style=cmake
|
|
hostmakedepends="pkg-config git qt5-host-tools"
|
|
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
|
|
cppzmq czmq-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 <helmut@pozimski.eu>"
|
|
license="3-clause-BSD"
|
|
homepage="https://getmonero.org"
|
|
distfiles="https://github.com/monero-project/monero/archive/v${version}.tar.gz"
|
|
checksum=5e8303900a39e296c4ebaa41d957ab9ee04e915704e1049f82a9cbd4eedc8ffb
|
|
|
|
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"
|
|
makedepends+=" libatomic-devel"
|
|
CFLAGS+=" -latomic"
|
|
;;
|
|
armv5*) configure_args+=" -DARCH=armv5"
|
|
makedepends+=" libatomic-devel"
|
|
CFLAGS+=" -latomic"
|
|
;;
|
|
aarch64*) configure_args+=" -DARCH=aarch64"
|
|
;;
|
|
mips*) configure_args+=" -DARCH=mipsr32 -DNO_AES=ON"
|
|
makedepends+=" libatomic-devel"
|
|
CFLAGS+=" -latomic"
|
|
;;
|
|
*) configure_args+=" -DARCH=default"
|
|
;;
|
|
esac
|
|
|
|
pre_configure() {
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
armv[56]*|mips*) sed -i CMakeLists.txt \
|
|
-e '/include(version.cmake)/i list(APPEND EXTRA_LIBRARIES libatomic.a)'
|
|
;;
|
|
esac
|
|
}
|
|
|
|
pre_build() {
|
|
if [ -n "$CROSS_BUILD" ]; then
|
|
# The generate_translations_header binary is executed during the build
|
|
# but is not included in the binary package. It thus needs to be
|
|
# built for the host
|
|
CC=${CC_host} CFLAGS="${XBPS_CFLAGS}" LDFLAGS="${XBPS_LDFLAGS}" \
|
|
make -C build ${makejobs} generate_translations_header
|
|
fi
|
|
}
|
|
|
|
post_install() {
|
|
vlicense LICENSE
|
|
vbin build/bin/monero-blockchain-import
|
|
vbin build/bin/monero-blockchain-export
|
|
vinstall utils/conf/monerod.conf 644 etc
|
|
vsv monerod
|
|
}
|
|
|
|
monero-devel_package() {
|
|
short_desc+=" - development files"
|
|
pkg_install() {
|
|
vlicense LICENSE
|
|
vmove usr/include
|
|
vmove "usr/lib/*.a"
|
|
}
|
|
}
|
|
|