aboutsummaryrefslogtreecommitdiffstats
path: root/testing/bitcoin/APKBUILD
blob: edd594ff6feade97557e10fccc7bc6b1446345e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=bitcoin
pkgver=0.9.3_rc2
_ver=${pkgver/_/}
pkgrel=0
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="$pkgname.post-install $pkgname.pre-install"
subpackages="$pkgname-qt $pkgname-cli"
source="$pkgname-$_ver.tar.gz::https://github.com/bitcoin/bitcoin/archive/v${_ver}.tar.gz
	ssize_t.patch
	$pkgname.initd
	$pkgname.conf
	"

_builddir="$srcdir"/bitcoin-$_ver
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
	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname || return 1
	install -m600 -D "$srcdir"/$pkgname.conf "$pkgdir"/etc/$pkgname.conf || 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
	mv "$pkgdir"/usr/bin/test_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="6c54e6ae0ba7aef6771d0bd6b839d055  bitcoin-0.9.3rc2.tar.gz
716a88e668729e89d3eb929da86f7f04  ssize_t.patch
56edf10681b0cd7cc33de1fd24155108  bitcoin.initd
3e9b4a37bb46e6cd83b6824870c58484  bitcoin.conf"
sha256sums="f44ac59c2bcdf630f234c5868f58d3256e446608fdb36ff2666d8b84a201f58b  bitcoin-0.9.3rc2.tar.gz
f0a094c7b374338ad153ee06b7dd2369dad6b97b1f1bb0252da12c9aaace5321  ssize_t.patch
df060fcee7227a2c7c4a435e24dea25b6388a6d6a98f01975c466a2c770e976a  bitcoin.initd
b7a31bf251f1011ab6584b610acac8494612c2012e9771985228c36c08a315ac  bitcoin.conf"
sha512sums="72ef51822a3f245a416ea3963340bba94911b12968ac8ea86212dbc39ce1e0f2b26a03830c02a79b891fae928f2569d25efa05f40a723b29875e67c147084ddc  bitcoin-0.9.3rc2.tar.gz
98aa5ad81bdb4ae961b791bc978c39117cdf2d83c2181f92bebbb0db107d9b6e86eda265fb3f93ff8a5ca8a7754d7148818b98095d57201dff9363d60b97e7dd  ssize_t.patch
9bab044e3ddc229f8e2b2eb170361f92d234c78e21c6f1c24a5fe1d0b480db5b6728dda990752eb0820085ecdc41538e735d631ff5886c270475a5b634e3729f  bitcoin.initd
48abce0f0a5b088c957aa5cb2bcf9bb520593caa7a20019bdf785e43f7d2459968240d4529dfa30be2fca92891bf50c1253a513530511e99d8ee471d9ff6bd95  bitcoin.conf"