# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
setvar pkgname = 'mongo-c-driver'
setvar pkgver = '1.8.0'
setvar pkgrel = '0'
setvar pkgdesc = ""Client library written in C for MongoDB""
setvar url = ""https://github.com/mongodb/mongo-c-driver""
setvar arch = ""all""
setvar license = ""Apache2""
setvar depends = ''
setvar depends_dev = ''
setvar makedepends = ""$depends_dev autoconf automake libbson-dev libtool""
setvar install = ''
setvar subpackages = ""$pkgname-dev $pkgname-doc""
setvar source = ""$pkgname-$pkgver.tar.gz::https://github.com/mongodb/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz""

setvar builddir = ""$srcdir"/$pkgname-$pkgver"

proc build {
	cd $builddir
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	make || return 1
}

proc package {
	cd $builddir
	make DESTDIR="$pkgdir" install || return 1

	# remove the 2 lines below (and this) if there is no init.d script
	# install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	# install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}

setvar sha512sums = ""c5df689121436c542dc59d7cf13199aa3e3db7aad1ebfe4529e996ecc8c48f645ddcbbe3a46f14ef06004415c12db6f806e76d1e2601ec5e52ee4430baca250c  mongo-c-driver-1.8.0.tar.gz""