aboutsummaryrefslogtreecommitdiffstats
path: root/main/mariadb-connector-c/APKBUILD
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-03-22 12:51:13 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-03-26 08:54:40 +0000
commit86472cf416d488df0ea4c9044accd77ff2c583c8 (patch)
treef96511d743e12c2ba064dd3b44b14606a78cf6bd /main/mariadb-connector-c/APKBUILD
parent75a15096cc405bd8f2b2d4fb7f3d9ae90ecf0bd0 (diff)
downloadaports-86472cf416d488df0ea4c9044accd77ff2c583c8.tar.bz2
aports-86472cf416d488df0ea4c9044accd77ff2c583c8.tar.xz
main/mariadb-connector-c: move from testing
this is needed for mariadb 10.2 upgrade also fix include and lib dir and -dev depends fixes #4768
Diffstat (limited to 'main/mariadb-connector-c/APKBUILD')
-rw-r--r--main/mariadb-connector-c/APKBUILD60
1 files changed, 60 insertions, 0 deletions
diff --git a/main/mariadb-connector-c/APKBUILD b/main/mariadb-connector-c/APKBUILD
new file mode 100644
index 0000000000..dee7b44c00
--- /dev/null
+++ b/main/mariadb-connector-c/APKBUILD
@@ -0,0 +1,60 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=mariadb-connector-c
+pkgver=3.0.3
+pkgrel=0
+pkgdesc="The MariaDB Native Client library (C driver)"
+url="http://mariadb.org/"
+arch="all"
+license="LGPLv2+"
+depends_dev="libressl-dev zlib-dev"
+makedepends="$depends_dev cmake"
+replaces="mariadb-client-libs"
+subpackages="$pkgname-dev"
+source="https://downloads.mariadb.org/interstitial/connector-c-3.0.3/mariadb-connector-c-$pkgver-src.tar.gz
+ cmake.patch"
+builddir="$srcdir/mariadb-connector-c-$pkgver-src"
+
+build() {
+ cd "$builddir"
+ 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_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ -DINSTALL_LIBDIR=/usr/lib \
+ -DINSTALL_INCLUDEDIR=/usr/include/mysql \
+ \
+ -DMARIADB_PORT=3306 \
+ -DMARIADB_UNIX_ADDR=/var/lib/mysql/mysql.sock \
+ -DWITH_EXTERNAL_ZLIB=YES \
+ -DWITH_MYSQLCOMPAT=ON \
+ -DWITH_SSL=OPENSSL \
+ ${CMAKE_CROSSOPTS}
+ make
+}
+
+package() {
+ cd "$builddir"
+ 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="6da66a32165cb74b106bf94e13a35d4bb38f05e5d2b3ff3740862dfc0892a7705977c1394b4f84b8e1f1e50a59a3fadbc62e7733b1feb532c6368a9fc262db04 mariadb-connector-c-3.0.3-src.tar.gz
+4fef45afaa2135310654e31df09de6a451014bdd495b9aa08467b666f543a643c1efdbcca4e866120a357e26a228765f511e8420327708775148b120ec9f161c cmake.patch"