aboutsummaryrefslogtreecommitdiffstats
path: root/community/bitcoin/APKBUILD
blob: 2cd2cffe2397591f27805eda0647db98f0d145c2 (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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=bitcoin
pkgver=0.13.1
_ver=${pkgver/_/}
pkgrel=0
pkgdesc="decentralized P2P electronic cash system"
url="http://www.bitcoin.org/"
arch="all"
license="MIT"
makedepends="autoconf automake libtool boost-dev libressl-dev db-dev miniupnpc-dev
	qt5-qtbase-dev qt5-qttools-dev protobuf-dev libqrencode-dev libevent-dev chrpath"
install="$pkgname.post-install $pkgname.pre-install"
subpackages="$pkgname-dev $pkgname-qt $pkgname-cli $pkgname-tx $pkgname-tests $pkgname-bench"
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"

build() {
	cd "$builddir"
	./autogen.sh
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--with-incompatible-bdb \
		--with-gui=qt5 \
		--with-utils \
		--disable-ccache \
		--disable-static \
		--enable-hardening \
		|| 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
	rm -f "$pkgdir"/usr/lib/*.la
}

qt() {
	pkgdesc="Bitcoin with a Qt frontend & QR Code support"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/$pkgname-qt "$subpkgdir"/usr/bin/ || return 1
}

cli() {
	pkgdesc="Bitcoin CLI"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/$pkgname-cli "$subpkgdir"/usr/bin/ || return 1
}

tx() {
	pkgdesc="Bitcoin TX (Transaction Tool)"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/$pkgname-tx "$subpkgdir"/usr/bin/ || return 1
}

tests() {
	pkgdesc="Bitcoin & Bitcoin-QT Unit Tests)"
	mkdir -p "$subpkgdir"/usr/bin
	chrpath -d "$pkgdir"/usr/bin/test_$pkgname || return 1
	mv "$pkgdir"/usr/bin/test_$pkgname-qt "$subpkgdir"/usr/bin/ || return 1
	mv "$pkgdir"/usr/bin/test_$pkgname "$subpkgdir"/usr/bin/ || return 1
}

bench() {
	pkgdesc="Bitcoin Benchmarking Tools)"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/bench_$pkgname "$subpkgdir"/usr/bin/ || return 1
}

dev() {
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/lib "$subpkgdir"/usr/ || return 1
	mv "$pkgdir"/usr/include "$subpkgdir"/usr/ || return 1
}

md5sums="3ccb66404e6da9b995a607de997ca3bf  bitcoin-0.13.1.tar.gz
716a88e668729e89d3eb929da86f7f04  ssize_t.patch
fc93c580823d65a7f50c2518f0b63a4b  bitcoin.initd
3e9b4a37bb46e6cd83b6824870c58484  bitcoin.conf"
sha256sums="97d4a1aea7aed957e76f8f5e6ba2a2bfc66c1fcbdaf76ee46bd0650e5957eaa9  bitcoin-0.13.1.tar.gz
f0a094c7b374338ad153ee06b7dd2369dad6b97b1f1bb0252da12c9aaace5321  ssize_t.patch
0103f6961e0c9dd0ac73f6bce4d8035103c13db717391d6b56c0db8118dcfae9  bitcoin.initd
b7a31bf251f1011ab6584b610acac8494612c2012e9771985228c36c08a315ac  bitcoin.conf"
sha512sums="05c5d9454c3256912bab422ad79b289a7bd67730f7ff4f5f50d010ec5a1eda89b6eb84f688cda875e950a832f8c427b22119e8bb678fc4ee5213272e22bc45d5  bitcoin-0.13.1.tar.gz
98aa5ad81bdb4ae961b791bc978c39117cdf2d83c2181f92bebbb0db107d9b6e86eda265fb3f93ff8a5ca8a7754d7148818b98095d57201dff9363d60b97e7dd  ssize_t.patch
87547359fe75d88906f8ea38ac3e40f7501779983d53d5e05fc8b29e0062e8b67f18dc587045c8699da9ffe57c55aa43c38de389a5476ddf1223bf90b78f4fe3  bitcoin.initd
48abce0f0a5b088c957aa5cb2bcf9bb520593caa7a20019bdf785e43f7d2459968240d4529dfa30be2fca92891bf50c1253a513530511e99d8ee471d9ff6bd95  bitcoin.conf"