# Maintainer: Natanael Copa pkgname=bitcoin pkgver=0.9.1 pkgrel=2 pkgdesc="decentralized P2P electronic cash system" url="http://www.bitcoin.org/" arch="all" license="MIT" depends="" depends_dev="" makedepends="$depends_dev boost-dev openssl-dev db-dev miniupnpc-dev qt5-qtbase-dev qt5-qttools-dev protobuf-dev libqrencode-dev autoconf automake libtool" install="" subpackages="$pkgname-qt $pkgname-cli" source="$pkgname-$pkgver.tar.gz::https://github.com/bitcoin/bitcoin/archive/v$pkgver.tar.gz ssize_t.patch 20-set-default-env.patch " _builddir="$srcdir"/bitcoin-$pkgver prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done ./autogen.sh } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --mandir=/usr/share/man \ --with-incompatible-bdb \ --disable-ccache \ --with-gui=qt5 \ || return 1 make || return 1 } package() { cd "$_builddir" make install DESTDIR="$pkgdir" || return 1 } qt() { pkgdesc="Bitcoin with a Qt frontend & QR Code support" mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/bitcoin-qt "$subpkgdir"/usr/bin/ || return 1 } cli() { pkgdesc="Bitcoin CLI" mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/bitcoin-cli "$subpkgdir"/usr/bin/ || return 1 } md5sums="7a9c14c09b04e3e37d703fbfe5c3b1e2 bitcoin-0.9.1.tar.gz 716a88e668729e89d3eb929da86f7f04 ssize_t.patch de733598adec12a7c0e8f2665a086f6d 20-set-default-env.patch" sha256sums="bf5021a426b5e38a741a5294a0ceb22daa74cda11c6dc0478c4aa48c55fdccb3 bitcoin-0.9.1.tar.gz f0a094c7b374338ad153ee06b7dd2369dad6b97b1f1bb0252da12c9aaace5321 ssize_t.patch d0763e09784cb09900be7e702e4bbadfc3230715d1f6afa6d70417ab64dde5ef 20-set-default-env.patch" sha512sums="75be422fc263f209783fc66d9fd99027d67c7460c599a23badafcf5546ce7cb21206fce04c516a1c101aeff13542b332249b3b70a70c483aa82a5048dbdc9d92 bitcoin-0.9.1.tar.gz 98aa5ad81bdb4ae961b791bc978c39117cdf2d83c2181f92bebbb0db107d9b6e86eda265fb3f93ff8a5ca8a7754d7148818b98095d57201dff9363d60b97e7dd ssize_t.patch 288934bea005cd6fdcf87525ce82fc0c031e0b86bba02c217c1e32536d3c51981ff187ee630f64787c6d7978d89802f8107b91fa8b2a86fbbb45cb79738e291b 20-set-default-env.patch"