summaryrefslogtreecommitdiff
path: root/dev-db
diff options
context:
space:
mode:
authorAchim Gottinger <achim@gentoo.org>2000-08-07 17:43:41 +0000
committerAchim Gottinger <achim@gentoo.org>2000-08-07 17:43:41 +0000
commit2dbe5cd6fd4415ced8a3f5dd0ea407f66c3f9ae6 (patch)
treed135ffd751d2f25a5b57dba9012ede540c2f924c /dev-db
parent*** empty log message *** (diff)
downloadgentoo-2-2dbe5cd6fd4415ced8a3f5dd0ea407f66c3f9ae6.tar.gz
gentoo-2-2dbe5cd6fd4415ced8a3f5dd0ea407f66c3f9ae6.tar.bz2
gentoo-2-2dbe5cd6fd4415ced8a3f5dd0ea407f66c3f9ae6.zip
*** empty log message ***
Diffstat (limited to 'dev-db')
-rw-r--r--dev-db/mysql/files/digest1
-rw-r--r--dev-db/mysql/files/my.cnf40
-rwxr-xr-xdev-db/mysql/files/mysql114
-rw-r--r--dev-db/mysql/mysql-3.22.32-r1.ebuild98
4 files changed, 253 insertions, 0 deletions
diff --git a/dev-db/mysql/files/digest b/dev-db/mysql/files/digest
new file mode 100644
index 000000000000..777da6c9569a
--- /dev/null
+++ b/dev-db/mysql/files/digest
@@ -0,0 +1 @@
+MD5 244e08d9a1f4b2ad799aa40ad3cc897a mysql-3.22.32.tar.gz
diff --git a/dev-db/mysql/files/my.cnf b/dev-db/mysql/files/my.cnf
new file mode 100644
index 000000000000..0e09333d04d2
--- /dev/null
+++ b/dev-db/mysql/files/my.cnf
@@ -0,0 +1,40 @@
+# Example mysql config file.
+# You can copy this to one of:
+# @sysconfdir@/my.cnf to set global options,
+# mysql-data-dir/my.cnf to set server-specific options (in this
+# installation this directory is @localstatedir@) or
+# ~/.my.cnf to set user-specific options.
+#
+# One can use all long options that the program supports.
+# Run the program with --help to get a list of available options
+
+# This will be passed to all mysql clients
+[client]
+#password = my_password
+port = 3306
+socket = /tmp/mysql.sock
+
+# Here is entries for some specific programs
+# The following values assume you have at least 32M ram
+
+# The MySQL server
+[mysqld]
+port = 3306
+socket = /tmp/mysql.sock
+user = mysql
+skip-locking
+set-variable = key_buffer=16M
+set-variable = max_allowed_packet=1M
+set-variable = thread_stack=128K
+# Start logging
+log
+
+[mysqldump]
+quick
+set-variable = max_allowed_packet=16M
+
+[mysql]
+no-auto-rehash
+
+[isamchk]
+set-variable = key_buffer=16M \ No newline at end of file
diff --git a/dev-db/mysql/files/mysql b/dev-db/mysql/files/mysql
new file mode 100755
index 000000000000..f0a6ea019a13
--- /dev/null
+++ b/dev-db/mysql/files/mysql
@@ -0,0 +1,114 @@
+#!/bin/sh
+#RCUPDATE:3 4:71: Required for rc-update
+# Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB
+# This file is public domain and comes with NO WARRANTY of any kind
+
+# Mysql daemon start/stop script.
+
+# Usually this is put in /etc/init.d (at least on machines SYSV R4
+# based systems) and linked to /etc/rc3.d/S99mysql. When this is done
+# the mysql server will be started when the machine is started.
+
+# Comments to support chkconfig on RedHat Linux
+# chkconfig: 2345 90 90
+# description: A very fast and reliable SQL database engine.
+
+. /etc/rc.d/config/functions
+
+SERVICE="MySQL server"
+opts="start stop restart"
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+basedir=/usr
+bindir=/usr/bin
+datadir=/var/mysql
+pid_file=/var/mysql/mysqld.pid
+mysql_daemon_user=root # Run mysqld as this user.
+export PATH
+
+mode=$1
+
+if test -w / # determine if we should look at the root config file
+then # or user config file
+ conf=/etc/my.cnf
+else
+ conf=$HOME/.my.cnf # Using the users config file
+fi
+
+# The following code tries to get the variables safe_mysqld needs from the
+# config file. This isn't perfect as this ignores groups, but it should
+# work as the options doesn't conflict with anything else.
+
+if test -f "$conf" # Extract those fields we need from config file.
+then
+ if grep "^datadir" $conf >/dev/null
+ then
+ datadir=`grep "^datadir" $conf | cut -f 2 -d= | tr -d ' '`
+ fi
+ if grep "^user" $conf >/dev/null
+ then
+ mysql_daemon_user=`grep "^user" $conf | cut -f 2 -d= | tr -d ' ' | head -1`
+ fi
+ if grep "^pid-file" $conf >/dev/null
+ then
+ pid_file=`grep "^pid-file" $conf | cut -f 2 -d= | tr -d ' '`
+ else
+ if test -d "$datadir"
+ then
+ pid_file=$datadir/`hostname`.pid
+ fi
+ fi
+ if grep "^basedir" $conf >/dev/null
+ then
+ basedir=`grep "^basedir" $conf | cut -f 2 -d= | tr -d ' '`
+ bindir=$basedir/bin
+ fi
+ if grep "^bindir" $conf >/dev/null
+ then
+ bindir=`grep "^bindir" $conf | cut -f 2 -d=| tr -d ' '`
+ fi
+fi
+
+
+# Safeguard (relative paths, core dumps..)
+cd $basedir
+
+start() {
+ # Start daemon
+
+ if test -x $bindir/safe_mysqld
+ then
+ # Give extra arguments to mysqld with the my.cnf file. This script may
+ # be overwritten at next upgrade.
+ ebegin "Starting MySQL server..."
+ $bindir/safe_mysqld --user=$mysql_daemon_user --pid-file=$pid_file --datadir=$datadir >/dev/null &
+ eend $? "Error starting MySQL"
+ else
+ echo "Can't execute $bindir/safe_mysqld"
+ fi
+}
+
+stop () {
+
+ # Stop daemon. We use a signal here to avoid having to know the
+ # root password.
+ if test -f "$pid_file"
+ then
+ mysqld_pid=`cat $pid_file`
+ ebegin "Killing $SERVICE with pid $mysqld_pid"
+ start-stop-daemon --stop --quiet --pid=$pid_file 1>&2
+ eend $? "Error stopping $SERVICE"
+ # mysqld should remove the pid_file when it exits.
+ else
+ echo "No mysqld pid file found. Looked for $pid_file."
+ fi
+}
+
+restart () {
+ stop
+ start
+}
+
+doservice ${@}
+
+
diff --git a/dev-db/mysql/mysql-3.22.32-r1.ebuild b/dev-db/mysql/mysql-3.22.32-r1.ebuild
new file mode 100644
index 000000000000..d49659473d92
--- /dev/null
+++ b/dev-db/mysql/mysql-3.22.32-r1.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-3.22.32-r1.ebuild,v 1.1 2000/08/07 17:40:15 achim Exp $
+
+P=mysql-3.22.32
+A=${P}.tar.gz
+S=${WORKDIR}/${P}
+DESCRIPTION="The MySQL Database"
+SRC_URI="http://www.mysql.com/Downloads/MySQL-3.22/${A}"
+HOMEPAGE="http://www.mysql.com/"
+CATEGORY="dev-db"
+
+
+src_compile() {
+ if [ "$PLATFORM" = "i686-pc-linux-gnu" ]
+ then
+ export CFLAGS="-mpentium"
+ export CXXFLAGS="-mpentium"
+ fi
+ # Patch for qmail-mysql
+ cd ${S}/include
+ cp nisam.h nisam.h.orig
+ sed -e "s/define N_MAX_KEY_LENGTH 256/define N_MAX_KEY_LENGTH 500/" nisam.h.orig > nisam.h
+
+ cd ${S}
+ CXX=gcc ./configure --prefix=/usr --host=${CHOST} \
+ --enable-shared \
+ --enable-static \
+ --enable-assembler \
+ --libdir=/usr/lib \
+ --libexecdir=/usr/sbin \
+ --sysconfdir=/etc/mysql \
+ --localstatedir=/var/mysql \
+ --infodir=/usr/info \
+ --mandir=/usr/man \
+ --without-debug \
+ --with-mysql-user=mysql
+ make benchdir=/usr/share/mysql-bench
+}
+
+src_install() {
+
+ cd ${S}
+
+ # Install MySQL
+
+ make install prefix=${D}/usr \
+ libdir=${D}/usr/lib \
+ libexecdir=${D}/usr/sbin \
+ sysconfdir=${D}/etc/mysql \
+ localstatedir=${D}/var/mysql \
+ infodir=${D}/usr/info \
+ mandir=${D}/usr/man \
+ benchdir=${D}/usr/share/mysql-bench
+
+ prepman
+ prepinfo
+
+ # Move Client Libs
+ mv ${D}/usr/lib/mysql/libmysqlclient.so* ${D}/usr/lib
+
+ into /
+ dodir /etc/mysql
+ cp scripts/mysqlaccess.conf ${D}/etc/mysql
+ cp ${O}/files/my.cnf ${D}/etc/mysql
+
+ dodir /etc/rc.d/init.d
+ cp ${O}/files/mysql ${D}/etc/rc.d/init.d/mysql
+
+ # MySQL Docs
+
+ cd ${S}
+ into /usr
+ dodoc INSTALL-SOURCE INSTALL-SOURCE-GENERIC README PUBLIC MIRRORS
+ cd ${S}/Docs
+ dodoc INSTALL-BINARY manual.ps manual.txt
+ docinto html
+ dodoc manual.html manual_toc.html
+ docinto html/Img
+ dodoc Img/*.gif
+
+}
+
+pkg_postinst () {
+
+ . ${ROOT}/var/lib/packages/install.config
+ if [ "$ROOT" == "/" ] ; then
+ /usr/bin/mysql_install_db
+ /etc/rc.d/init.d/mysql start
+ sleep 5
+ /usr/bin/mysqladmin password $MySQLpass
+ fi
+ echo "Setting up symlinks..."
+ ${ROOT}/usr/sbin/rc-update add mysql
+
+}
+