# Tanım: MongoDB için C ile yazılmış bir istemci kütüphanesi
# URL: http://www.mongodb.org/display/DOCS/C+Language+Center
# Paketçi: Cihan_Alkan
# Gerekler: libsasl icu snappy zlib cmake
# Grup: sistem


isim=mongo-c-driver
surum=1.13.0
devir=1
kaynak=(https://github.com/mongodb/mongo-c-driver/archive/$surum.tar.gz::$isim-$surum.tar.gz
        https://github.com/mongodb/mongo-c-driver/commit/b50c9e4004833e3c0034b68b4082d6e590510949.patch)

derle() {

  mkdir -p build
  cd mongo-c-driver-$surum
  patch -p1 -i ../b50c9e4004833e3c0034b68b4082d6e590510949.patch

  cd $SRC/build
  cmake ../mongo-c-driver-$surum \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DENABLE_STATIC=OFF -DENABLE_TESTS=OFF
    # Test profiles are not found even with ENABLE_TESTS=ON
  make

  make DESTDIR="$PKG/" install
}