diff options
Diffstat (limited to 'main/mariadb/APKBUILD')
-rw-r--r-- | main/mariadb/APKBUILD | 195 |
1 files changed, 195 insertions, 0 deletions
diff --git a/main/mariadb/APKBUILD b/main/mariadb/APKBUILD new file mode 100644 index 0000000000..07e5c53040 --- /dev/null +++ b/main/mariadb/APKBUILD @@ -0,0 +1,195 @@ +# Contributor: Ćukasz Jendrysik <scadu@yandex.com> +# Contributor: Carlo Landmeter <clandmeter@gmail.com> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=mariadb +pkgver=5.5.41 +pkgrel=0 +pkgdesc="A fast SQL database server" +url="http://www.mariadb.org" +pkgusers="mysql" +pkggroups="mysql" +arch="all" +license='GPL' +depends="" +depends_dev="openssl-dev zlib-dev" +makedepends="cmake openssl-dev zlib-dev readline-dev libaio-dev ncurses-dev + jemalloc-dev glib linux-headers libc-dev" +source="https://downloads.mariadb.org/interstitial/mariadb-$pkgver/source/mariadb-$pkgver.tar.gz +$pkgname.initd +fix-xtradb-storage.patch +" + +subpackages="$pkgname-doc $pkgname-dev $pkgname-libs $pkgname-common $pkgname-client $pkgname-bench $pkgname-test:mytest" + +_builddir="$srcdir/$pkgname-$pkgver" + +prepare() { + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + cmake . -DBUILD_CONFIG=mysql_release \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DSYSCONFDIR=/etc/mysql \ + -DMYSQL_DATADIR=/var/lib/mysql \ + -DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock \ + -DDEFAULT_CHARSET=utf8 \ + -DDEFAULT_COLLATION=utf8_general_ci \ + -DENABLED_LOCAL_INFILE=ON \ + -DINSTALL_INFODIR=share/mysql/docs \ + -DINSTALL_MANDIR=share/man \ + -DINSTALL_PLUGINDIR=lib/mysql/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 \ + -DWITH_READLINE=ON \ + -DWITH_ZLIB=system \ + -DWITH_SSL=system \ + -DWITH_LIBWRAP=OFF \ + -DWITH_EXTRA_CHARSETS=complex \ + -DWITH_EMBEDDED_SERVER=ON \ + -DWITH_ARCHIVE_STORAGE_ENGINE=1 \ + -DWITH_BLACKHOLE_STORAGE_ENGINE=1 \ + -DWITH_INNOBASE_STORAGE_ENGINE=1 \ + -DWITH_PARTITION_STORAGE_ENGINE=1 \ + -DWITHOUT_TOKUDB_STORAGE_ENGINE=1 \ + -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \ + -DWITHOUT_FEDERATED_STORAGE_ENGINE=1 \ + -DWITHOUT_PBXT_STORAGE_ENGINE=1 \ + || return 1 + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir/" install || return 1 + + install -Dm 755 "$startdir"/$pkgname.initd \ + "$pkgdir"/etc/init.d/$pkgname || return 1 + + # use small example config as default, which has tcp disabled + install -D "$pkgdir"/usr/share/mysql/my-medium.cnf \ + "$pkgdir"/etc/mysql/my.cnf || return 1 + + install -dDo mysql "$pkgdir"/var/log/mysql || return 1 + install -dDo mysql "$pkgdir"/var/run/mysqld || return 1 + + # libmysqlclient_r is no more. Upstream tries to replace it with + # symlinks but that really doesn't work (wrong soname in particular). + # We'll keep just the devel libmysqlclient_r.so link, so that + # rebuilding without any source change is enough to get rid of + # dependency on libmysqlclient_r. + rm -f "$pkgdir"/usr/lib/libmysqlclient_r.so* + ln -s libmysqlclient.so "$pkgdir"/usr/lib/libmysqlclient_r.so + + # mysql-test includes one executable that doesn't belong under + # /usr/share, so move it and provide a symlink + mv "$pkgdir"/usr/mysql-test/lib/My/SafeProcess/my_safe_process \ + "$pkgdir"/usr/bin + ln -s ../../../../bin/my_safe_process \ + "$pkgdir"/usr/mysql-test/lib/My/SafeProcess/my_safe_process + +} + +dev(){ + default_dev + replaces="libmysqlclient" +} + +libs() { + pkgdesc="MariaDB client library" + replaces="mariadb libmysqlclient" + depends="mariadb-common" + mkdir -p "$subpkgdir"/usr/lib \ + "$subpkgdir"/usr/share/mysql \ + || return 1 + mv "$pkgdir"/usr/lib/libmysqlclient.so* \ + "$subpkgdir"/usr/lib/ \ + || return 1 +} + +common() { + pkgdesc="MariaDB common files for boh server and client" + replaces="mariadb" + depends= + mkdir -p "$subpkgdir"/usr/share/mysql \ + mv "$pkgdir"/etc "$subpkgdir"/ || return 1 + mv "$pkgdir"/usr/share/mysql/english \ + "$pkgdir"/usr/share/mysql/czech \ + "$pkgdir"/usr/share/mysql/danish \ + "$pkgdir"/usr/share/mysql/dutch \ + "$pkgdir"/usr/share/mysql/estonian \ + "$pkgdir"/usr/share/mysql/french \ + "$pkgdir"/usr/share/mysql/german \ + "$pkgdir"/usr/share/mysql/greek \ + "$pkgdir"/usr/share/mysql/hungarian \ + "$pkgdir"/usr/share/mysql/italian \ + "$pkgdir"/usr/share/mysql/japanese \ + "$pkgdir"/usr/share/mysql/korean \ + "$pkgdir"/usr/share/mysql/norwegian \ + "$pkgdir"/usr/share/mysql/norwegian-ny \ + "$pkgdir"/usr/share/mysql/polish \ + "$pkgdir"/usr/share/mysql/portuguese \ + "$pkgdir"/usr/share/mysql/romanian \ + "$pkgdir"/usr/share/mysql/russian \ + "$pkgdir"/usr/share/mysql/serbian \ + "$pkgdir"/usr/share/mysql/slovak \ + "$pkgdir"/usr/share/mysql/spanish \ + "$pkgdir"/usr/share/mysql/swedish \ + "$pkgdir"/usr/share/mysql/ukrainian \ + "$pkgdir"/usr/share/mysql/charsets \ + "$subpkgdir"/usr/share/mysql/ \ + || return 1 +} + +mytest() { + pkgdesc="The test suite distributed with MariaDB" + mkdir -p "$subpkgdir"/usr/bin || return 1 + mv "$pkgdir"/usr/bin/mysql_client_test \ + "$pkgdir"/usr/mysql-test \ + "$pkgdir"/usr/bin/my_safe_process \ + "$subpkgdir"/usr/bin/ \ + || return 1 +} + +client() { + pkgdesc="client for the MariaDB database" + depends="mariadb-common" + install="" + local bins="myisam_ftdump mysql mysqlaccess mysqladmin mysqlbug + mysqlcheck mysqldump mysqldumpslow mysql_find_rows + mysql_fix_extensions mysqlimport mysqlshow mysql_waitpid" + + mkdir -p "$subpkgdir"/usr/bin/ || return 1 + + for i in $bins; do + mv "$pkgdir"/usr/bin/${i} "$subpkgdir"/usr/bin/ || return 1 + done +} + +bench() { + pkgdesc="MariaDB benchmark scripts and data" + replaces="mariadb" + mkdir -p "$subpkgdir"/usr/share/ + mv "$pkgdir"/usr/sql-bench "$subpkgdir"/usr/share +} + +md5sums="d2415efc6a6d73d7a58f3c79bb42f2e8 mariadb-5.5.41.tar.gz +01fe0055305d8f974c35d0898245014b mariadb.initd +0bc35376a413719e77808ab778378517 fix-xtradb-storage.patch" +sha256sums="a16dc62e4bcabecd5c483f2f8b657483a8c51934e7be5ad4ab21b8baea1f5332 mariadb-5.5.41.tar.gz +cbf3c99c41310033ed092b38ae0f55bc74334ce4531a6c82f21feff26f25008d mariadb.initd +b83ee0bdf0f1c40f563dc227cb3fa1060ca859cb42222886f66550a3c2fe0b7a fix-xtradb-storage.patch" +sha512sums="727ce6994966a42602ea8f735f34b1b3c342d08b9dae2667e465805bff36e68bf69b582ec0b844b25fb7024f9b25a39280160c2935f639491a1c3654d3166953 mariadb-5.5.41.tar.gz +fccc31e8e67dc21087c4feb3a36d2ac129dccfe6d393172b58834b408faa85ab6f9f70ec423c88ab7613df9ae258a8db990f3c48d69ef2a1906f7e3b4e18c892 mariadb.initd +64505f8a65ceb4e3568b81ba4e58c8c92264f12c3d16a5bf3e9c26978ba6e4f120f653b74a9cabb252540559f1019647ab070a067d90e6cb75ccc4bfca0126bd fix-xtradb-storage.patch" |