# Contributor: Joe Searle # Maintainer: Joe Searle pkgname=mariadb-connector-odbc pkgver=3.1.18 pkgrel=0 pkgdesc="MariaDB Connector/ODBC database driver" url="https://github.com/mariadb-corporation/mariadb-connector-odbc" arch="all" license="LGPL-2.1-only" options="!check" # 'test' directory not included in releases makedepends="cmake samurai openssl-dev>3 unixodbc-dev mariadb-connector-c-dev" source="$pkgname-$pkgver.tar.gz::https://github.com/mariadb-corporation/mariadb-connector-odbc/archive/$pkgver.tar.gz" build() { if [ "$CBUILD" != "$CHOST" ]; then CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux" fi # Link to /usr/include/mysql necessary when using system installed mariadb-connector-c CFLAGS="$CFLAGS -I/usr/include/mysql" \ cmake -G Ninja -B build \ -DCMAKE_INSTALL_PREFIX=/usr \ -DBUILD_SHARED_LIBS=True \ -DCMAKE_BUILD_TYPE=None \ -DUSE_SYSTEM_INSTALLED_LIB=True \ -DWITH_SSL=OPENSSL \ $CMAKE_CROSSOPTS . cmake --build build } package() { DESTDIR="$pkgdir" cmake --install build # Remove license files rm -rf "$pkgdir"/usr/docs } sha512sums=" c6a3a7b82095b7aef40f3cfd8917007cff9d3cda1ce49f009ed70c0c53f47d3ac0dcd88418143331ac56332094d9efa08de47290941e5ff887bdad0e9e9c92eb mariadb-connector-odbc-3.1.18.tar.gz "