Commit 0fec41ca authored by Leo's avatar Leo

testing/mongo-c-driver: split libbson-static and libbson-dev

parent a65b512c
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=mongo-c-driver
pkgver=1.14.0
pkgrel=0
pkgrel=1
pkgdesc="Client library written in C for MongoDB"
url="https://github.com/mongodb/mongo-c-driver"
arch="all"
license="Apache-2.0"
makedepends="openssl-dev snappy-dev zlib-dev libtool py3-sphinx cmake"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc libbson"
subpackages="
$pkgname-static:_static
libbson-static:_libbson_static
$pkgname-dev:_dev
$pkgname-doc
libbson
libbson-dev
"
source="https://github.com/mongodb/$pkgname/releases/download/$pkgver/$pkgname-$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"
build() {
mkdir -p "$srcdir"/build
......@@ -50,7 +56,62 @@ package() {
libbson() {
pkgdesc="Building, parsing, and iterating BSON documents"
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libbson-* "$subpkgdir"/usr/lib/
mv "$pkgdir"/usr/lib/libbson-*.so.* "$subpkgdir"/usr/lib/
}
_static() {
# Depend on the dev package that has the headers required
# for compiling against, whether it is static or shared
depends_static="mongo-c-driver-dev"
default_static
# Move the libbson static archive from the mongo-c-driver-static
# back to $pkgdir it will be then moved to libbson-static
mkdir -p "$pkgdir"/usr/lib
mv "$subpkgdir"/usr/lib/libbson-static-1.0.a "$pkgdir"/usr/lib
# Move development dependencies that only make sense in the context
# of static libraries like libmongoc-static-1.0.pc
mkdir -p "$subpkgdir"/usr/lib/pkgconfig
mkdir -p "$subpkgdir"/usr/lib/cmake
mv "$pkgdir"/usr/lib/pkgconfig/libmongoc-static-1.0.pc "$subpkgdir"/usr/lib/pkgconfig
mv "$pkgdir"/usr/lib/cmake/libmongoc-static-1.0 "$subpkgdir"/usr/lib/cmake
}
_libbson_static() {
# Depend on the dev package that has the headers required
# for compiling against, whether it is static or shared
depends_static="libbson-dev"
default_static
# Move development dependencies that only make sense in the context
# of static libraries like libbson-static-1.0.pc
mkdir -p "$subpkgdir"/usr/lib/pkgconfig
mkdir -p "$subpkgdir"/usr/lib/cmake
mv "$pkgdir"/usr/lib/pkgconfig/libbson-static-1.0.pc "$subpkgdir"/usr/lib/pkgconfig
mv "$pkgdir"/usr/lib/cmake/libbson-static-1.0 "$subpkgdir"/usr/lib/cmake
}
_dev() {
default_dev
# libbson pkg-config files
mkdir -p "$pkgdir"/usr/lib/pkgconfig
mv "$subpkgdir"/usr/lib/pkgconfig/libbson-1.0.pc "$pkgdir"/usr/lib/pkgconfig
# libbson solink
mkdir -p "$pkgdir"/usr/lib
mv "$subpkgdir"/usr/lib/libbson-1.0.so "$pkgdir"/usr/lib
# libbson cmake file
mkdir -p "$pkgdir"/usr/lib/cmake
mv "$subpkgdir"/usr/lib/cmake/libbson-1.0 "$pkgdir"/usr/lib/cmake
# libbson include files
mkdir -p "$pkgdir"/usr/include
mv "$subpkgdir"/usr/include/libbson-1.0 "$pkgdir"/usr/include
}
sha512sums="99ca4001341d044a8ffc02a5d7175d40f8a998bdaad15a668a7db0558fa616ec18152faeda6da7f28b34c5d2cf4b649180c9390d2229e1342b6c4f6742816994 mongo-c-driver-1.14.0.tar.gz"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment