summaryrefslogtreecommitdiffstats
path: root/main/mysql
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-24 08:01:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-24 08:01:31 +0000
commitb70981b68efcce5256eb11c6cd26ae123b10b6ea (patch)
treea38be6efae5e2ba15c2e839504632f9b7bfd5f91 /main/mysql
parent2b4df81538b8398442d5296650905c70341dd8d3 (diff)
downloadaports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.bz2
aports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.xz
moved extra/* to main/
and fixed misc build issues
Diffstat (limited to 'main/mysql')
-rw-r--r--main/mysql/APKBUILD70
-rw-r--r--main/mysql/mysql.initd38
-rw-r--r--main/mysql/mysql.mycnf49
3 files changed, 157 insertions, 0 deletions
diff --git a/main/mysql/APKBUILD b/main/mysql/APKBUILD
new file mode 100644
index 000000000..de03c127d
--- /dev/null
+++ b/main/mysql/APKBUILD
@@ -0,0 +1,70 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=mysql
+pkgver=5.0.83
+pkgrel=0
+pkgdesc="A fast SQL database server"
+url="http://www.mysql.com/"
+license='GPL'
+depends=
+makedepends="libtool uclibc++-dev readline-dev openssl-dev ncurses-dev zlib-dev"
+source="http://sunsite.informatik.rwth-aachen.de/mysql/Downloads/MySQL-5.0/${pkgname}-${pkgver}.tar.gz
+$pkgname.initd
+$pkgname.mycnf"
+subpackages="$pkgname-doc $pkgname-dev $pkgname-test libmysqlclient $pkgname-client"
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ export CXX=g++-uc
+ ./configure --prefix=/usr --libexecdir=/usr/sbin \
+ --localstatedir=/var/lib/mysql \
+ --disable-assembler --with-pthread \
+ --without-raid --without-libwrap \
+ --without-pstack --without-docs \
+ --without-embedded-server --with-openssl \
+ --without-mysqlfs --without-vio \
+ --without-bench --without-debug \
+ --with-unix-socket-path=/var/run/mysqld/mysqld.sock \
+ --with-innodb --mandir=/usr/share/man || return 1
+ make || return 1
+ make -j1 DESTDIR="$pkgdir/" install
+ install -Dm 755 "$startdir"/$pkgname.initd $pkgdir/etc/init.d/$pkgname
+ install -Dm 644 "$startdir"/$pkgname.mycnf $pkgdir/etc/mysql/my.cnf
+ install -dDo mysql $pkgdir/var/log/mysql
+ install -dDo mysql $pkgdir/var/run/mysqld
+}
+
+libmysqlclient() {
+ pkgdesc="MySQL client library"
+ mkdir -p "$subpkgdir"/usr/lib/mysql
+ mv "$pkgdir"/usr/lib/mysql/libmysqlclient.so* "$subpkgdir"/usr/lib/mysql
+ # make symlinks
+ cd "$subpkgdir"/usr/lib
+ for i in mysql/*; do
+ ln -s "$i" "${i##*/}"
+ done
+}
+
+test() {
+ mkdir -p "$subpkgdir"/usr
+ mv "$pkgdir"/usr/mysql-test "$subpkgdir"/usr/
+}
+
+client() {
+ pkgdesc="client for the MySQL database"
+ install=""
+ local bins="myisam_ftdump mysql mysqlaccess mysqladmin mysqlbug mysqlcheck
+ mysql_client_test mysqldump mysqldumpslow mysql_explain_log mysql_find_rows
+ mysql_fix_extensions mysqlimport mysqlshow mysql_tableinfo mysqltestmanagerc
+ mysqltestmanager-pwgen mysql_waitpid"
+
+ mkdir -p "$subpkgdir"/usr/bin/
+
+ for i in $bins; do
+ mv "$pkgdir"/usr/bin/${i} "$subpkgdir"/usr/bin/
+ done
+}
+
+md5sums="051392064a1e32cca5c23a593908b10e mysql-5.0.83.tar.gz
+3ce9827b22d8fbbb29d83a91cbe98ffc mysql.initd
+15a7e3ddd6a40bf5a1eb3a8c69d9c34c mysql.mycnf"
diff --git a/main/mysql/mysql.initd b/main/mysql/mysql.initd
new file mode 100644
index 000000000..8f841646b
--- /dev/null
+++ b/main/mysql/mysql.initd
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/dev-db/mysql/files/mysql.init,v 1.7 2004/07/14 21:41:15 agriffis Exp $
+
+depend() {
+ need net
+ use dns
+}
+
+checkconfig() {
+ if [ ! -f /etc/mysql/my.cnf ] ; then
+ eerror "No /etc/mysql/my.cnf file exists!"
+ fi
+
+ dir=`my_print_defaults -c /etc/mysql/my.cnf mysqld | grep -- --datadir | sed -e "s|^.*=\(.*\)|\1|"`
+
+ if [ ! -d $dir/mysql ] ; then
+ eerror "You dont appear to have the mysql database installed yet."
+ eerror "Please run /usr/bin/mysql_install_db --user=mysql to have this done..."
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting mysqld"
+ /usr/bin/mysqld_safe --defaults-file=/etc/mysql/my.cnf >/dev/null 2>&1 &
+ eend $?
+}
+
+stop () {
+ ebegin "Stopping mysqld"
+ start-stop-daemon --stop --quiet \
+ --pidfile=/var/run/mysqld/mysqld.pid --retry 20
+ eend $?
+}
+
diff --git a/main/mysql/mysql.mycnf b/main/mysql/mysql.mycnf
new file mode 100644
index 000000000..6df0334ef
--- /dev/null
+++ b/main/mysql/mysql.mycnf
@@ -0,0 +1,49 @@
+# The following values assume you have at least 32M RAM!
+
+[client]
+#password = my_password
+port = 3306
+socket = /var/run/mysqld/mysqld.sock
+
+[safe_mysqld]
+err-log = /var/log/mysql/mysql.err
+
+[mysqld]
+# this disabled mysqld from listing on any interface.
+# Use localhost to connect to socket
+# If you need networking comment out the following line
+skip-networking
+
+# If innodb is needed commend next line
+# if not leave this to increase performance
+skip-innodb
+
+innodb_file_per_table
+user = mysql
+pid-file = /var/run/mysqld/mysqld.pid
+socket = /var/run/mysqld/mysqld.sock
+port = 3306
+
+# Only enable this if you really need it
+# eats resources.
+#log = /var/log/mysql/mysql.log
+
+basedir = /usr
+datadir = /var/lib/mysql
+tmpdir = /tmp
+language = /usr/share/mysql/english
+skip-locking
+set-variable = key_buffer=16M
+set-variable = max_allowed_packet=1M
+set-variable = thread_stack=128K
+
+[mysqldump]
+quick
+set-variable = max_allowed_packet=1M
+
+[mysql]
+#no-auto-rehash # faster start of mysql but no tab completition
+
+[isamchk]
+set-variable = key_buffer=16M
+