aboutsummaryrefslogtreecommitdiffstats
path: root/main/mysql/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/mysql/APKBUILD')
-rw-r--r--main/mysql/APKBUILD184
1 files changed, 137 insertions, 47 deletions
diff --git a/main/mysql/APKBUILD b/main/mysql/APKBUILD
index b77e322c37..518225a2b4 100644
--- a/main/mysql/APKBUILD
+++ b/main/mysql/APKBUILD
@@ -1,82 +1,165 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mysql
-pkgver=5.1.56
-pkgrel=0
+pkgver=5.5.10
+pkgrel=1
pkgdesc="A fast SQL database server"
url="http://www.mysql.com/"
pkgusers="mysql"
pkggroups="mysql"
arch="all"
license='GPL'
-depends=
-makedepends="libtool readline-dev openssl-dev ncurses-dev zlib-dev"
-source="http://ftp.sunet.se/pub/unix/databases/relational/mysql/Downloads/MySQL-5.1/mysql-$pkgver.tar.gz
+depends="mysql-common"
+makedepends="libtool readline-dev openssl-dev ncurses-dev zlib-dev cmake bison perl libaio-dev"
+source="ftp://mirror.csclub.uwaterloo.ca/mysql/Downloads/MySQL-5.5/$pkgname-$pkgver.tar.gz
+ 0001-prefer-dynamic-library.patch
$pkgname.initd
- $pkgname.mycnf
"
-subpackages="$pkgname-doc $pkgname-dev $pkgname-test libmysqlclient $pkgname-client"
+subpackages="$pkgname-doc $pkgname-dev $pkgname-libs $pkgname-test:mytest
+ $pkgname-common $pkgname-client $pkgname-bench"
_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
- cd $_builddir
- sed -i -e 's/-lnsl //g' configure.in
- sed -i -e 's/-lnsl //g' configure
+ 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
- ./configure --prefix=/usr --libexecdir=/usr/sbin \
- --localstatedir=/var/lib/mysql \
- --disable-assembler \
- --with-pthread \
- --without-libwrap \
- --without-pstack \
- --without-docs \
- --without-embedded-server \
- --with-ssl \
- --without-debug \
- --with-unix-socket-path=/var/run/mysqld/mysqld.sock \
- --with-plugins=partition,archive,blackhole,csv,federated,heap,innobase,innodb_plugin,ndbcluster \
- --mandir=/usr/share/man \
+ cd "$_builddir"
+ cmake . -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DDEFAULT_CHARSET=utf8 \
+ -DDEFAULT_COLLATION=utf8_general_ci \
+ -DENABLED_LOCAL_INFILE=ON \
+ -DINSTALL_DOCDIR=share/doc/mysql \
+ -DINSTALL_DOCREADMEDIR=share/doc/mysql \
+ -DINSTALL_INCLUDEDIR=include/mysql \
+ -DINSTALL_INFODIR=share/info \
+ -DINSTALL_LAYOUT=RPM \
+ -DINSTALL_MANDIR=share/man \
+ -DINSTALL_MYSQLDATADIR="/var/lib/mysql" \
+ -DINSTALL_MYSQLSHAREDIR=share/mysql \
+ -DINSTALL_MYSQLTESTDIR=share/mysql-test \
+ -DINSTALL_PLUGINDIR=lib/mysql/plugin \
+ -DINSTALL_SCRIPTDIR=bin \
+ -DINSTALL_SHAREDIR=share/mysql \
+ -DINSTALL_SQLBENCHDIR=share \
+ -DINSTALL_SUPPORTFILESDIR=share/mysql \
+ -DMYSQL_DATADIR="/var/lib/mysql" \
+ -DMYSQL_UNIX_ADDR="/var/run/mysqld/mysqld.sock" \
+ -DSYSCONFDIR=/etc/mysql \
+ -DWITHOUT_ARCHIVE_STORAGE_ENGINE=1 \
+ -DWITHOUT_BLACKHOLE_STORAGE_ENGINE=1 \
+ -DWITHOUT_EMBEDDED_SERVER=ON \
+ -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
+ -DWITHOUT_FEDERATED_STORAGE_ENGINE=1 \
+ -DWITH_EXTRA_CHARSETS=complex \
+ -DWITH_INNOBASE_STORAGE_ENGINE=1 \
+ -DWITH_PARTITION_STORAGE_ENGINE=1 \
+ -DWITH_READLINE=ON \
+ -DWITH_SSL=system \
+ -DWITH_ZLIB=system \
|| return 1
make || return 1
}
+# -DWITH_LIBWRAP=ON \
package() {
- cd $_builddir
- make -j1 DESTDIR="$pkgdir/" install || return 1
- install -Dm 755 "$startdir"/$pkgname.initd $pkgdir/etc/init.d/$pkgname \
- || return 1
- install -Dm 644 "$startdir"/$pkgname.mycnf $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
+ 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/share/mysql-test/lib/My/SafeProcess/my_safe_process \
+ "$pkgdir"/usr/bin
+ ln -s ../../../../../bin/my_safe_process \
+ "$pkgdir"/usr/share/mysql-test/lib/My/SafeProcess/my_safe_process
+
}
-libmysqlclient() {
+libs() {
pkgdesc="MySQL client library"
# some files moved
+ replaces="mysql libmysqlclient"
+ depends="mysql-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="MySQL common files for both server and client"
replaces="mysql"
- mkdir -p "$subpkgdir"/usr/lib/mysql || return 1
- mv "$pkgdir"/usr/lib/mysql/libmysqlclient.so* \
- "$pkgdir"/usr/lib/mysql/libmysqlclient_r.so* \
- "$subpkgdir"/usr/lib/mysql || return 1
- # make symlinks
- cd "$subpkgdir"/usr/lib || return 1
- for i in mysql/*; do
- ln -s "$i" "${i##*/}" || return 1
- done
+ 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
}
-test() {
+mytest() {
+ pkgdesc="The test suite distributed with MySQL"
mkdir -p "$subpkgdir"/usr || return 1
- mv "$pkgdir"/usr/mysql-test "$subpkgdir"/usr/ || return 1
+ mv "$pkgdir"/usr/share/mysql-test \
+ "$subpkgdir"/usr/share/ \
+ || return 1
+ mv "$pkgdir"/usr/bin/mysql_client_test \
+ "$pkgdir"/usr/bin/my_safe_process \
+ "$pkgdir"/usr/bin/ \
+ || return 1
}
client() {
pkgdesc="client for the MySQL database"
+ depends="mysql-common"
install=""
local bins="myisam_ftdump mysql mysqlaccess mysqladmin mysqlbug
mysqlcheck mysql_client_test mysqldump mysqldumpslow mysql_find_rows
@@ -89,6 +172,13 @@ client() {
done
}
-md5sums="15161d67f4830aad3a8a89e083749d49 mysql-5.1.56.tar.gz
-25d08b02bff6aa379dc45859b7a3f28a mysql.initd
-15a7e3ddd6a40bf5a1eb3a8c69d9c34c mysql.mycnf"
+bench() {
+ pkgdesc="MySQL benchmark scripts and data"
+ replaces="mysql"
+ mkdir -p "$subpkgdir"/usr/share/
+ mv "$pkgdir"/usr/share/sql-bench "$subpkgdir"/usr/share/
+}
+
+md5sums="ee604aff531ff85abeb10cf332c1355a mysql-5.5.10.tar.gz
+4e07e045a3abcb457c9c148dfd929ed6 0001-prefer-dynamic-library.patch
+d46df8ab94cb5686862ff90c0a6bf707 mysql.initd"