# Maintainer: Natanael Copa pkgname=mariadb-connector-c pkgver=3.1.6 pkgrel=0 pkgdesc="The MariaDB Native Client library (C driver)" url="https://mariadb.org/" arch="all" license="LGPL-2.1-or-later" depends_dev="openssl-dev zlib-dev" makedepends="$depends_dev cmake" replaces="mariadb-client-libs" subpackages="$pkgname-dev" source="https://downloads.mariadb.org/interstitial/connector-c-$pkgver/mariadb-connector-c-$pkgver-src.tar.gz cmake.patch fix-ucontext-header.patch " builddir="$srcdir/mariadb-connector-c-$pkgver-src" build() { if [ "$CBUILD" != "$CHOST" ]; then CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" fi cmake \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX=/usr \ -DBUILD_SHARED_LIBS=True \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_FLAGS="$CFLAGS" \ -DINSTALL_LIBDIR=/usr/lib \ -DINSTALL_INCLUDEDIR=/usr/include/mysql \ \ -DMARIADB_PORT=3306 \ -DMARIADB_UNIX_ADDR=/run/mysqld/mysqld.sock \ -DWITH_EXTERNAL_ZLIB=YES \ -DWITH_MYSQLCOMPAT=ON \ -DWITH_SSL=OPENSSL \ $CMAKE_CROSSOPTS make } package() { make DESTDIR="$pkgdir" install # purge static libs rm "$pkgdir"/usr/lib/*.a # compat symlinks ln -s mariadb_config "$pkgdir"/usr/bin/mysql_config ln -s mariadb_version.h "$pkgdir"/usr/include/mysql/mysql_version.h } dev() { default_dev replaces="mariadb-dev" mv "$pkgdir"/usr/bin "$subpkgdir"/usr/ } sha512sums="44309e706cb49451a0d1a91f907ab7cfa1fb1bf95d26cf3bbce1caa367c2fa8ad377a691361e297dd2fcbc444c10115f18aec66dd6d69c458f282ace3025a3e8 mariadb-connector-c-3.1.6-src.tar.gz a3a1ec5fa984cd4a3545436c8a6f3cd5495bc2c0644ed11dd8957df399f72c9b4545f65b255909d31732b73513fe40bac98f2bffd3180ecfff22efd5ce1d38f0 cmake.patch 757a2d3531ee271cf5473671bf4d0ac07dc8eb94ab4b6ede848ba7a55415a77f90e7275103be91c73e343e94cdbf2cd652eb6cef6ed48917991733d60d3b8777 fix-ucontext-header.patch"