blob: 0ba96cc08599d10335a8eb8363fdf5c39d1cc1b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
# 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.23.22.ebuild,v 1.1 2000/08/22 21:41:16 achim Exp $
P=mysql-3.23.22-beta
A=${P}.tar.gz
S=${WORKDIR}/${P}
DESCRIPTION="The MySQL Database"
SRC_URI="http://www.mysql.com/Downloads/MySQL-3.23/${A}"
HOMEPAGE="http://www.mysql.com/"
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_config () {
echo "Setting up symlinks..."
${ROOT}/usr/sbin/rc-update add mysql
}
|