aboutsummaryrefslogtreecommitdiffstats
path: root/testing/mongo-c-driver/APKBUILD
blob: 5663509c0878173f6ca279b8ba10196d73c143a6 (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
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=mongo-c-driver
pkgver=1.9.3
pkgrel=0
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_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
	libressl-2.7.patch"
builddir="$srcdir/$pkgname-$pkgver"

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

build() {
	cd "$builddir"
	autoreconf -vif
	SPHINX_BUILD=/usr/bin/sphinx-build-3 ./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--enable-ssl=libressl \
		--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="2c3f915c4f367f5614a904741b4b480896dd521b7039158b2f421d0d7579a45862d5099cd26b6d14cb088f9db49019538aca553c5cf72d9706ec9ab6516ff40a  mongo-c-driver-1.9.3.tar.gz
5bd714ac7123fcd08853a65029f207c61961cf8d9d0acc292cc00c0e6d1ecf6da20640257408a9d85604434230d231a7725f83c2c6ad467b13c81c4731e66a45  libressl-2.7.patch"