summaryrefslogtreecommitdiffstats
path: root/extra/mysql/Pkgfile
blob: 4c413c09ea7938274b99a8a4a86e7c19a8220c19 (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
# Description: Serveur de base de données MySQL
# URL: http://www.mysql.com
# Maintainer: NuTyX core team
# Packager: thierryn1 at hispeed dot ch
# Depends on: mysqlclient

name=mysql
version=5.1.52
release=1
source=(http://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.1/$name-$version.tar.gz)

build () {
	source /etc/blfs-bootscripts
        wget http://www.linuxfromscratch.org/blfs/downloads/svn/$scripts-$scriptsversion.tar.bz2
        tar xvf $scripts-$scriptsversion.tar.bz2
	cd $name-$version
	libtoolize --force
	aclocal
	autoconf
	automake
	./configure --prefix=/usr \
                --sysconfdir=/etc \
                --libexecdir=/usr/sbin \
                --localstatedir=/srv/mysql \
                --enable-assembler \
                --enable-thread-safe-client \
                --enable-local-infile \
                --with-unix-socket-path=/var/run/mysql/mysql.sock \
                --with-extra-charsets=all \
		--with-plugins=partition,innobase,innodb_plugin \
                --without-debug \
                --without-readline \
                --without-docs \
                --without-bench 
	make
	make DESTDIR=$PKG install
	rm -r $PKG/usr/{mysql-test,sql-bench}
	for i in mysql mysql_upgrade \
	mysqladmin mysqlbinlog \
	mysqlcheck mysqldump mysqlimport mysqlshow \
	mysqlslap mysqltest mysql_config
	do rm -r $PKG/usr/bin/$i
	done
	rm $PKG/usr/share/mysql/charsets/README
	mkdir -p $PKG/etc
	install -v -m644 $PKG/usr/share/mysql/my-medium.cnf \
	$PKG/etc/my.cnf
	sed -i -e s/^skip-federated/#skip-federated/ \
	$PKG/etc/my.cnf
	cd ../$scripts-$scriptsversion
	make DESTDIR=$PKG install-mysql
	# Suppression des librairies
	rm -r $PKG/usr/{include,lib}
}