# Template file for 'bitcoin'
pkgname=bitcoin
version=0.7.0
revision=1
wrksrc="${pkgname}-${version}-linux"
subpackages="bitcoin-qt"
makedepends="which qt-devel boost-devel automoc4 miniupnpc-devel"
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/"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}-linux.tar.gz"
checksum=4b7a44fec28cbd9194a1303dd65bba8f13aa2facd4e06e4a3d1df6d66bc1deb5
long_desc="
 Bitcoin is an experimental new digital currency that enables instant payments
 to anyone, anywhere in the world. Bitcoin uses peer-to-peer technology to
 operate with no central authority: managing transactions and issuing money are
 carried out collectively by the network. Bitcoin is also the name of the open
 source software which enables the use of this currency."

do_build() {
	cd src
	# qt gui
	qmake && make ${makejobs}
	# daemon
	make -f makefile.unix -C src ${makejobs} USE_UPNP=1
}

do_install() {
	vinstall src/src/bitcoind 755 usr/bin
	vinstall src/contrib/debian/examples/bitcoin.conf 644 usr/share/examples/$pkgname
	vinstall src/contrib/debian/manpages/bitcoind.1 644 usr/share/man/man1
	vinstall src/contrib/debian/manpages/bitcoin.conf.5 644 usr/share/man/man5
	vinstall COPYING 644 usr/share/licenses/$pkgname
}
