aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mongo-c-driver/APKBUILD
blob: 65c0d0165a0bdea24e4b5e0597ac4f296d6cac52 (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
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=mongo-c-driver
pkgver=1.9.2
pkgrel=1
pkgdesc="Client library written in C for MongoDB"
url="https://github.com/mongodb/mongo-c-driver"
arch="all !x86 !armhf" # testsuite fails on x86 and armhf
license="Apache-2.0"
depends=
depends_dev="libressl-dev snappy-dev zlib-dev"
makedepends="$depends_dev autoconf automake libbson-dev libtool py3-sphinx"
install=
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/mongodb/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

case "$CARCH" in
	# FIXME: Tests hang on aarch64.
	aarch64) options="!check";;
esac

build() {
	cd "$builddir"
	SPHINX_BUILD=/usr/bin/sphinx-build-3 ./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--enable-man-pages=yes \
		--enable-tests=yes \
		--disable-automatic-init-and-cleanup \
		--with-libbson=system \
		--with-zlib=system
	make
}

check() {
	cd "$builddir"
	MONGOC_TEST_SKIP_LIVE=on make check
}

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

sha512sums="25fd78e23300c56dd72becd64bd47573e0c2ed9c5d2af1a917c2dbbfeea69054cc9c6eed6965be20aa325fa68a5c37791495cad44a164134868fa2ae823ea2ef  mongo-c-driver-1.9.2.tar.gz"