aboutsummaryrefslogtreecommitdiffstats
path: root/testing/rtrlib/APKBUILD
blob: 5454ec7bf2a9257f56520f3aa08cda91dfd30d11 (plain) (blame)
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
# Maintainer: Christian Franke <nobody@nowhere.ws>
pkgname=rtrlib
pkgver=0.7.0
pkgrel=2
pkgdesc="An open-source C implementation of the RPKI/Router Protocol client"
url="https://github.com/rtrlib/rtrlib"
arch="all"
license="MIT"
makedepends="cmake cmocka-dev doxygen graphviz libssh-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="${pkgname}-${pkgver}.tar.gz::https://github.com/rtrlib/rtrlib/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		${CMAKE_CROSSOPTS}
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="e1c78ce92d066308c1c4fbb6575c2f0dc0f6840c16be90e27bd0da184cab7d0fa4dd1cff3677eda5f1720184756e02765e5abd267b0da0d183082721fee2ffd8  rtrlib-0.7.0.tar.gz"