aboutsummaryrefslogtreecommitdiffstats
path: root/main/mariadb
diff options
context:
space:
mode:
Diffstat (limited to 'main/mariadb')
-rw-r--r--main/mariadb/APKBUILD146
1 files changed, 109 insertions, 37 deletions
diff --git a/main/mariadb/APKBUILD b/main/mariadb/APKBUILD
index 924f47df82..b218796526 100644
--- a/main/mariadb/APKBUILD
+++ b/main/mariadb/APKBUILD
@@ -6,7 +6,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mariadb
pkgver=10.2.13
-pkgrel=0
+pkgrel=1
pkgdesc="A fast SQL database server"
url="http://www.mariadb.org"
pkgusers="mysql"
@@ -14,13 +14,14 @@ pkggroups="mysql"
arch="all"
license="GPL-2.0"
depends="$pkgname-common"
-depends_dev="libressl-dev zlib-dev"
-makedepends="bison cmake curl-dev libaio-dev libarchive-dev libevent-dev libressl-dev
- libxml2-dev ncurses-dev pcre-dev readline-dev zlib-dev xz-dev linux-headers"
+depends_dev="libressl-dev zlib-dev mariadb-connector-c-dev"
+makedepends="$depends_dev bison cmake curl-dev libaio-dev libarchive-dev libevent-dev
+ libxml2-dev ncurses-dev pcre-dev readline-dev xz-dev linux-headers"
install="$pkgname.pre-install"
-subpackages="$pkgname-doc $pkgname-dev $pkgname-common $pkgname-openrc
- $pkgname-client-libs:_client_libs $pkgname-libs
- $pkgname-client $pkgname-bench $pkgname-test:mytest
+subpackages="$pkgname-static $pkgname-test:mytest $pkgname-embedded-dev:_embedded_dev
+ $pkgname-doc $pkgname-dev $pkgname-common $pkgname-openrc
+ $pkgname-client $pkgname-bench
+ $pkgname-backup $pkgname-embedded $pkgname-server-utils:_server_utils
mysql mysql-client:_compat_client mysql-bench:_compat_bench"
source="https://downloads.mariadb.org/interstitial/mariadb-$pkgver/source/mariadb-$pkgver.tar.gz
$pkgname.initd
@@ -30,7 +31,7 @@ source="https://downloads.mariadb.org/interstitial/mariadb-$pkgver/source/mariad
pcre.cmake.patch
"
# dbug test fails under rootbld
-options="!check"
+#options="!check"
builddir="$srcdir/$pkgname-$pkgver"
# secfixes:
@@ -63,16 +64,16 @@ build() {
-DDEFAULT_CHARSET=utf8 \
-DDEFAULT_COLLATION=utf8_general_ci \
-DENABLED_LOCAL_INFILE=ON \
- -DINSTALL_INFODIR=share/mysql/docs \
+ -DINSTALL_INFODIR=share/info \
-DINSTALL_MANDIR=share/man \
- -DINSTALL_PLUGINDIR=lib/mysql/plugin \
+ -DINSTALL_PLUGINDIR=lib/$pkgname/plugin \
-DINSTALL_SCRIPTDIR=bin \
-DINSTALL_INCLUDEDIR=include/mysql \
- -DINSTALL_DOCREADMEDIR=share/mysql \
- -DINSTALL_SUPPORTFILESDIR=share/mysql \
- -DINSTALL_MYSQLSHAREDIR=share/mysql \
- -DINSTALL_DOCDIR=share/mysql/docs \
- -DINSTALL_SHAREDIR=share/mysql \
+ -DINSTALL_DOCREADMEDIR=share/doc/$pkgname \
+ -DINSTALL_SUPPORTFILESDIR=share/$pkgname \
+ -DINSTALL_MYSQLSHAREDIR=share/$pkgname \
+ -DINSTALL_DOCDIR=share/doc/$pkgname \
+ -DTMPDIR=/var/tmp \
-DCONNECT_WITH_MYSQL=ON \
-DCONNECT_WITH_LIBXML2=system \
-DCONNECT_WITH_ODBC=NO \
@@ -114,7 +115,11 @@ build() {
-DWITH_VALGRIND=OFF \
-DWITH_ZLIB=system \
-DSKIP_TESTS=ON # Disables the client lib tests since a running server is needed
- make -j8
+
+ # print config options to log
+ cmake -L
+
+ make
}
check() {
@@ -130,7 +135,7 @@ package() {
"$pkgdir"/etc/init.d/$pkgname
# use small example config as default, which has tcp disabled
- install -Dm 640 -o mysql "$pkgdir"/usr/share/mysql/my-medium.cnf \
+ install -Dm 640 -o mysql "$pkgdir"/usr/share/mariadb/my-medium.cnf \
"$pkgdir"/etc/mysql/my.cnf
# mysql-test includes one executable that doesn't belong under
@@ -139,6 +144,35 @@ package() {
"$pkgdir"/usr/bin
ln -s ../../../../bin/my_safe_process \
"$pkgdir"/usr/mysql-test/lib/My/SafeProcess/my_safe_process
+
+ # mytop should be shipped in separate package
+ rm "$pkgdir"/usr/bin/mytop
+
+ # remove files provided by mariadb-connector-c
+ rm \
+ "$pkgdir"/usr/bin/mariadb_config \
+ "$pkgdir"/usr/bin/mysql_config \
+ "$pkgdir"/usr/include/mysql/errmsg.h \
+ "$pkgdir"/usr/include/mysql/ma_list.h \
+ "$pkgdir"/usr/include/mysql/ma_pvio.h \
+ "$pkgdir"/usr/include/mysql/ma_tls.h \
+ "$pkgdir"/usr/include/mysql/mariadb/ma_io.h \
+ "$pkgdir"/usr/include/mysql/mariadb_com.h \
+ "$pkgdir"/usr/include/mysql/mariadb_ctype.h \
+ "$pkgdir"/usr/include/mysql/mariadb_dyncol.h \
+ "$pkgdir"/usr/include/mysql/mariadb_stmt.h \
+ "$pkgdir"/usr/include/mysql/mariadb_version.h \
+ "$pkgdir"/usr/include/mysql/mysql.h \
+ "$pkgdir"/usr/include/mysql/mysql/client_plugin.h \
+ "$pkgdir"/usr/include/mysql/mysql/plugin_auth.h \
+ "$pkgdir"/usr/include/mysql/mysql/plugin_auth_common.h \
+ "$pkgdir"/usr/include/mysql/mysql_version.h \
+ "$pkgdir"/usr/include/mysql/mysqld_error.h \
+ "$pkgdir"/usr/lib/$pkgname/plugin/dialog.so \
+ "$pkgdir"/usr/lib/$pkgname/plugin/mysql_clear_password.so \
+ "$pkgdir"/usr/lib/libmysqlclient.so \
+ "$pkgdir"/usr/lib/libmysqlclient_r.so \
+ "$pkgdir"/usr/lib/libmariadb.so*
}
dev() {
@@ -146,37 +180,23 @@ dev() {
replaces="libmysqlclient mysql-dev"
provides="mysql-dev=$pkgver-r$pkgrel"
mkdir -p "$subpkgdir"/usr/bin
- mv "$pkgdir"/usr/bin/mysql_config "$subpkgdir"/usr/bin/
-}
-
-_client_libs() {
- pkgdesc="MariaDB client library"
- replaces="mariadb libmysqlclient"
- depends="mariadb-common"
- mkdir -p "$subpkgdir"/usr/lib \
- "$subpkgdir"/usr/share/mysql
- mv "$pkgdir"/usr/lib/libmariadb.so* \
- "$subpkgdir"/usr/lib/
}
common() {
pkgdesc="MariaDB common files for both server and client"
replaces="mysql-common"
depends=
- mkdir -p "$subpkgdir"/usr/share/mysql \
+ mkdir -p "$subpkgdir"/usr/share/$pkgname \
"$subpkgdir"/etc \
- "$subpkgdir"/usr/lib/mysql/plugin
+ "$subpkgdir"/usr/lib/$pkgname/plugin
mv "$pkgdir"/etc/mysql "$subpkgdir"/etc/
- mv "$pkgdir"/usr/lib/mysql/plugin/dialog.so \
- "$pkgdir"/usr/lib/mysql/plugin/mysql_clear_password.so \
- "$subpkgdir"/usr/lib/mysql/plugin/
local lang="charsets danish english french greek italian korean norwegian-ny
portuguese russian slovak swedish czech dutch estonian german
hungarian japanese norwegian polish romanian serbian spanish
ukrainian"
for l in $lang; do
- mv "$pkgdir"/usr/share/mysql/$l \
- "$subpkgdir"/usr/share/mysql/
+ mv "$pkgdir"/usr/share/$pkgname/$l \
+ "$subpkgdir"/usr/share/$pkgname/
done
}
@@ -184,14 +204,17 @@ mytest() {
pkgdesc="The test suite distributed with MariaDB"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/mysql_client_test \
- "$pkgdir"/usr/mysql-test \
"$pkgdir"/usr/bin/my_safe_process \
+ "$pkgdir"/usr/bin/mysqltest \
+ "$pkgdir"/usr/bin/mysqltest_embedded \
"$subpkgdir"/usr/bin/
+ mv "$pkgdir"/usr/mysql-test \
+ "$subpkgdir"/usr/
}
client() {
pkgdesc="Client for the MariaDB database"
- depends="mariadb-common"
+ depends="mariadb-common=$pkgver-r$pkgrel"
install=""
local bins="myisam_ftdump mysql mysqlaccess mysqladmin
mysqlcheck mysqldump mysqldumpslow mysql_find_rows
@@ -219,6 +242,55 @@ mysql() { _compat mysql mariadb; }
_compat_client() { _compat mysql-client mariadb-client; }
_compat_bench() { _compat mysql-bench mariadb-client; }
+static() {
+ pkgdesc="Static libraries for mariadb"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
+}
+
+backup() {
+ pkgdesc="The mariabackup tool for physical online backups"
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/mariabackup \
+ "$pkgdir"/usr/bin/mbstream \
+ "$subpkgdir"/usr/bin/
+}
+
+embedded() {
+ pkgdesc="MariaDB as an embeddable library"
+ depends="$pkgname-common=$pkgver-r$pkgrel"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/libmysqld.so.* "$subpkgdir"/usr/lib/
+}
+
+
+_embedded_dev() {
+ pkgdesc="MariaDB as an embeddable library - development files"
+ # this package only contains a symlink, but we want avoid pull in
+ # libmysqld (embedded) unless needed
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/libmysqld.so "$subpkgdir"/usr/lib/
+}
+
+_server_utils() {
+ pkgdesc="Non-essential server utilities for MariaDB/MySQL applications"
+ depends="perl $pkgname-common=$pkgver-r$pkgrel"
+ mkdir -p "$subpkgdir"/usr/bin
+ # perl utils
+ mv \
+ "$pkgdir"/usr/bin/mysql_convert_table_format \
+ "$pkgdir"/usr/bin/mysql_setpermission \
+ "$pkgdir"/usr/bin/mysqld_multi \
+ "$pkgdir"/usr/bin/mysqlhotcopy \
+ "$subpkgdir"/usr/bin/
+ # tools that can be used remotely and other tools
+ mv \
+ "$pkgdir"/usr/bin/mysql_upgrade \
+ "$pkgdir"/usr/bin/perror \
+ "$pkgdir"/usr/bin/mysqld_safe_helper \
+ "$subpkgdir"/usr/bin/
+}
+
sha512sums="4c6038f134a32f50daa3172b367588240ef20a6f6cfe36d830e427cf52d315284481f5300d3db32d9e81ddd352dbea01fd4230f4e4d79e175d97c0c49331a4ca mariadb-10.2.13.tar.gz
06751768cb00d2e433655635c38d267ef25084a5830ff40e719ac579223c7192dc34b43f919ab6faf480094632327511cbd22456064dde2d04dc15648b9e3b9f mariadb.initd
88d9084c8ca3a94e6e1a7fa91091f577ee063f4b13046cc805f61f3be37993b98c79665e5995d8b6b7fa10efbe00fcbde638db5b0b59f0d5e0e951b24b5108e9 fix-mysql-install-db-path.patch