void-packages/srcpkgs/bitcoin/template

73 lines
2.0 KiB
Bash

# Template file for 'bitcoin'
pkgname=bitcoin
version=0.17.1
revision=1
wrksrc="${pkgname}-${version}"
build_style=gnu-configure
configure_args="--with-incompatible-bdb --disable-ccache --disable-static --enable-hardening --with-boost=${XBPS_CROSS_BASE}/usr"
hostmakedepends="pkg-config yasm"
makedepends="db-devel protobuf-devel boost-devel miniupnpc-devel libevent-devel
qrencode-devel libatomic-devel"
short_desc="Bitcoin is a peer-to-peer network based digital currency"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="MIT"
homepage="https://bitcoin.org/"
distfiles="https://bitcoin.org/bin/bitcoin-core-${version}/bitcoin-${version}.tar.gz"
checksum=3e564fb5cf832f39e930e19c83ea53e09cfe6f93a663294ed83a32e194bda42a
conflicts="litecoin>=0" # Both provide libbitcoinconsensus.so.0
if [ -z "$CROSS_BUILD" ]; then
# XXX -qt subpkg
makedepends+=" qt5-devel qt5-tools-devel"
configure_args+=" --with-gui"
fi
pre_configure() {
extra_files="
https://raw.github.com/bitcoin-core/packaging/master/debian/bitcoin-qt.desktop
https://raw.github.com/bitcoin/bitcoin/v${version}/share/pixmaps/bitcoin128.png
https://raw.github.com/bitcoin-core/packaging/master/debian/examples/bitcoin.conf"
for f in ${extra_files}; do
$XBPS_FETCH_CMD $f
done
}
post_install() {
rm "${DESTDIR}"/usr/bin/test_bitcoin
rm "${DESTDIR}"/usr/bin/bench_bitcoin
if [ -z "$CROSS_BUILD" ]; then
rm "${DESTDIR}"/usr/bin/test_bitcoin-qt
fi
vlicense COPYING
}
bitcoin-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
vdoc doc/shared-libraries.md # Provides information on libbitcoinconsensus
}
}
if [ -z "$CROSS_BUILD" ]; then
bitcoin-qt_package() {
depends="desktop-file-utils"
short_desc+=" - QT GUI"
pkg_install() {
vmove usr/bin/bitcoin-qt
vmove usr/share/man/man1/bitcoin-qt.1
vinstall bitcoin-qt.desktop 644 usr/share/applications
vinstall bitcoin128.png 644 usr/share/pixmaps
vlicense COPYING
}
}
fi # !CROSS_BUILD