aboutsummaryrefslogtreecommitdiffstats
path: root/community/rippled/APKBUILD
blob: 1d3e46c4bc7e5b905131b1bb04a11a77097d0283 (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
# Contributor: André Klitzing <aklitzing@gmail.com>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=rippled
pkgver=1.9.4
pkgrel=1
pkgdesc="Blockchain daemon implementing the Ripple Consensus Ledger"
options="net !check" # FIXME: 1 failure, rippled testsuite doesn't tell which one it is
url="https://ripple.com/"
# needs 64bit, build fails on s390x and ppc64le
arch="aarch64 x86_64"
license="ISC"
makedepends="
	boost-dev
	c-ares-dev
	cmake
	grpc-dev
	libarchive-dev
	lz4-dev
	openssl-dev>3
	protobuf-dev
	re2-dev
	rocksdb-dev
	samurai
	snappy-dev
	sqlite-dev
	zlib-dev
	"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/ripple/rippled/archive/$pkgver.tar.gz
	disable-failing-test.patch
	"

prepare() {
	default_prepare

	# don't add aports gitrev into build
	git init .
}

build() {
	cmake -B build -G Ninja \
		-Dstatic=OFF \
		-Dtests="$(want_check && echo ON || echo OFF)" \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release
	cmake --build build
}

check() {
	./build/rippled --unittest --unittest-jobs ${JOBS:-2}
}

package() {
	install -D -m644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
	install -D build/rippled "$pkgdir/usr/bin/rippled"
	install -D -m644 cfg/rippled-example.cfg "$pkgdir/etc/$pkgname/rippled.cfg"
	install -D -m644 cfg/validators-example.txt "$pkgdir/etc/$pkgname/validators.txt"
}

sha512sums="
8fd442c8c8950690f5325aa8653449b0e749992d600eae0e04ccefa9d92e59fad1948ea0472c4d4a678841f19953fbda44bef31c354d5e213ed3f1496dc9e89e  rippled-1.9.4.tar.gz
5df6abbea0252f42765d382f31194c2fa5137996adfaf8c9192a46c318f34e60d137ee690bd3baadea184d64f862040b91af169ee8dc226f67cf21e4ee60bf0a  disable-failing-test.patch
"