# Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # $Header: /var/cvsroot/gentoo-x86/dev-db/mysql/mysql-3.23.51-r1.ebuild,v 1.2 2002/07/16 08:41:59 rphillips Exp $ SVER=${PV%.*} #normal releases: SDIR=MySQL-${SVER} #for a pre-release: #SDIR=MySQL-${SVER}-Pre DESCRIPTION="A fast, multi-threaded, multi-user SQL database server." HOMEPAGE="http://www.mysql.com/" SRC_URI="ftp://ftp.sunet.se/pub/unix/databases/relational/mysql/Downloads/${SDIR}/${P}.tar.gz ftp://mysql.valueclick.com/pub/mysql/Downloads/${SDIR}/${P}.tar.gz" S=${WORKDIR}/${P} LICENSE="GPL-2" SLOT="0" DEPEND="virtual/glibc readline? ( >=sys-libs/readline-4.1 ) tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) >=sys-libs/zlib-1.1.3 sys-devel/perl sys-apps/procps berkdb? ( >sys-libs/db-3* )" # on >=gentoo-1.3, USE berkdb will build the bundled 3.2.9a version. # on >/var/log/mysql/mysql.err 2>&1 else einfo "Hmm, it appears as though you already have the mysql" einfo "database in place. If you are having problems trying" einfo "to start mysqld, perhaps you need to manually run" einfo "/usr/bin/mysql_install_db and/or check your config" einfo "file(s) and/or database(s) and/or logfile(s)." fi } pkg_postinst() { # empty dirs... install -d -m0755 -o mysql -g mysql ${ROOT}/var/lib/mysql install -d -m0755 -o mysql -g mysql ${ROOT}/var/run/mysqld install -d -m0755 -o mysql -g mysql ${ROOT}/var/log/mysql # secure the logfiles... does this bother anybody? touch ${ROOT}/var/log/mysql/mysql.{log,err} chown mysql.mysql ${ROOT}/var/log/mysql/mysql.{log,err} chmod 0660 ${ROOT}/var/log/mysql/mysql.{log,err} # your friendly public service announcement... einfo einfo "You might want to run:" einfo "\"ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config\"" einfo "if this is a new install." einfo }