updated on Thu Jan 12 20:00:29 UTC 2012
[aur-mirror.git] / mysql51 / PKGBUILD
blobfcb81a5cecda8bb321479bf7c30269e758f160a1
1 # Contributor: Andrea Scarpino <andrea@archlinux.org>
2 # Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
3 # Contributor: judd <jvinet@zeroflux.org>
4 # Contributor: Danny Navarro <j@dannynavarro.net>
6 pkgname=mysql51
7 pkgver=5.1.61
8 pkgrel=1
9 arch=('i686' 'x86_64')
10 license=('GPL')
11 pkgdesc="A fast SQL database server"
12 backup=('etc/mysql/my.cnf')
13 url="http://www.mysql.com/"
14 depends=('openssl' 'gcc-libs')
15 makedepends=('zlib' 'perl' 'libtool')
16 optdepends=('perl-dbi' 'perl-dbd-mysql')
17 options=('!libtool')
18 provides=('mysql' 'libmysqlclient' 'mysql-clients')
19 conflicts=('mysql' 'libmysqlclient' 'mysql-clients')
20 install="${pkgname}.install"
21 source=("http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.1/mysql-${pkgver}.tar.gz"
22         'mysqld'
23         'my.cnf'
24         'skip-abi-check.patch')
26 md5sums=('4efd10c69c4c99dbdb8fae3834a6d7b8'
27          '2234207625baa29b2ff7d7b4f088abce'
28          '0337741fa9afbe57939993636081a827'
29          'a97e574945e19de3908575b956241026')
31 build() {
32   cd "${srcdir}/mysql-${pkgver}"
33   patch -Np0 -i "${srcdir}/skip-abi-check.patch"
34   # CFLAGS/CXXFLAGS as suggested upstream
35   CFLAGS="-fPIC ${CFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer" \
36   CXXFLAGS="-fPIC ${CXXFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-rtti" \
37   ./configure --prefix=/usr \
38     --libexecdir=/usr/sbin \
39     --localstatedir=/var \
40     --sysconfdir=/etc/mysql \
41     --without-docs \
42     --with-readline \
43     --without-libedit \
44     --with-ssl \
45     --with-zlib-dir=/usr \
46     --with-charset=utf8 \
47     --with-collation=utf8_general_ci \
48     --with-extra-charsets=complex \
49     --with-embedded-server \
50     --with-unix-socket-path=/var/run/mysqld/mysqld.sock \
51     --enable-local-infile \
52     --with-plugins=innobase,innodb_plugin \
53     --datadir=/var/lib/mysql
54   make
57 package() {
58   cd "${srcdir}/mysql-${pkgver}"
59   make DESTDIR=${pkgdir} install
60   
61   # create library symlinks in /usr/lib
62   ln -sf mysql/libmysqlclient.so.16 ${pkgdir}/usr/lib/libmysqlclient.so.16
63   ln -sf libmysqlclient.so.16 ${pkgdir}/usr/lib/libmysqlclient.so
64   ln -sf libmysqlclient.so.16 ${pkgdir}/usr/lib/libmysqlclient.so.1
65   ln -sf mysql/libmysqlclient_r.so.16  ${pkgdir}/usr/lib/libmysqlclient_r.so.16
66   ln -sf libmysqlclient_r.so.16 ${pkgdir}/usr/lib/libmysqlclient_r.so
67   ln -sf libmysqlclient_r.so.16 ${pkgdir}/usr/lib/libmysqlclient_r.so.1
69   install -Dm644 ${srcdir}/my.cnf ${pkgdir}/etc/mysql/my.cnf
70   install -Dm755 ${srcdir}/mysqld ${pkgdir}/etc/rc.d/mysqld
72   rm -r ${pkgdir}/usr/{sql-bench,mysql-test}
74   install -dm700 ${pkgdir}/var/lib/mysql