diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-07-21 21:45:14 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-07-22 06:49:04 -0300 |
commit | 0fec41cadc153cc9148e2c744cac9d9777f8f1f1 (patch) | |
tree | 8d7a7e957f63669336dbdf799dd1364a0c98480b /testing/mongo-c-driver | |
parent | a65b512cdca74f71535f3fc459a24042860d65d7 (diff) | |
download | aports-0fec41cadc153cc9148e2c744cac9d9777f8f1f1.tar.bz2 aports-0fec41cadc153cc9148e2c744cac9d9777f8f1f1.tar.xz |
testing/mongo-c-driver: split libbson-static and libbson-dev
Diffstat (limited to 'testing/mongo-c-driver')
-rw-r--r-- | testing/mongo-c-driver/APKBUILD | 69 |
1 files changed, 65 insertions, 4 deletions
diff --git a/testing/mongo-c-driver/APKBUILD b/testing/mongo-c-driver/APKBUILD index b6a7838503..d721fcf653 100644 --- a/testing/mongo-c-driver/APKBUILD +++ b/testing/mongo-c-driver/APKBUILD @@ -1,15 +1,21 @@ # 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" |