void-packages/srcpkgs/bitcoin/template

65 lines
2 KiB
Plaintext

# Template file for 'bitcoin'
pkgname=bitcoin
version=0.9.3
revision=2
create_wrksrc=yes
hostmakedepends="which pkg-config"
makedepends="db-devel protobuf-devel libressl-devel boost-devel>=1.54 miniupnpc-devel>=1.9"
short_desc="Bitcoin is a peer-to-peer network based digital currency"
maintainer="Juan RP <xtraeme@gmail.com>"
license="MIT"
homepage="http://www.bitcoin.org/"
update_site="https://bitcoin.org/en/download"
update_pattern='bitcoin-\K[\d.]+(?=-linux.tar.gz)'
distfiles="http://bitcoin.org/bin/${version}/bitcoin-${version}-linux.tar.gz"
checksum=c425783b6cbab9b801ad6a1dcc9235828b98e5dee6675112741f8b210e4f65cd
if [ -z "$CROSS_BUILD" ]; then
# XXX -qt subpkg
hostmakedepends+=" automoc4"
makedepends+=" qt-devel"
configure_args+=" --with-gui=qt4"
fi
pre_configure() {
extra_files="
https://raw.github.com/bitcoin/bitcoin/v${version}/contrib/debian/bitcoin-qt.desktop
https://raw.github.com/bitcoin/bitcoin/v${version}/share/pixmaps/bitcoin128.png
https://raw.github.com/bitcoin/bitcoin/v${version}/contrib/debian/examples/bitcoin.conf
https://raw.github.com/bitcoin/bitcoin/v${version}/contrib/debian/manpages/bitcoind.1
https://raw.github.com/bitcoin/bitcoin/v${version}/contrib/debian/manpages/bitcoin.conf.5"
for f in ${extra_files}; do
$XBPS_FETCH_CMD $f
done
tar xf ${pkgname}-${version}-linux/src/${pkgname}-${version}.tar.gz -C ${wrksrc}
}
do_configure() {
cd ${pkgname}-${version}
./configure ${configure_args} --with-incompatible-bdb --with-boost=${XBPS_CROSS_BASE}/usr
}
do_build() {
cd ${pkgname}-${version}
make ${makejobs}
}
do_install() {
vbin ${pkgname}-${version}/src/bitcoind
vsconf bitcoin.conf
vman bitcoind.1
vman bitcoin.conf.5
vlicense ${pkgname}-${version}/COPYING
}
if [ -z "$CROSS_BUILD" ]; then
bitcoin-qt_package() {
depends="desktop-file-utils"
short_desc+=" - QT GUI"
pkg_install() {
vbin ${wrksrc}/${sourcepkg}-${version}/src/qt/bitcoin-qt
vinstall ${wrksrc}/bitcoin-qt.desktop 644 usr/share/applications
vinstall ${wrksrc}/bitcoin128.png 644 usr/share/pixmaps
}
}
fi # !CROSS_BUILD