summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/libmysqlclient/PKGBUILD
blob: 5ab1e46024f2e5b51094ee5d34baf031bfc41434 (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
# $Id: PKGBUILD 23680 2009-01-11 15:55:34Z douglas $
# Maintainer: judd <jvinet@zeroflux.org>

pkgname=libmysqlclient
pkgver=5.0.75
pkgrel=2
pkgdesc="MySQL client libraries"
arch=(i686 x86_64)
depends=('openssl' 'zlib')
makedepends=('gcc' 'readline' 'tcp_wrappers' 'libtool')
options=('!libtool')
license=('GPL')
url=('http://www.mysql.com/')
source=(http://mysql.cce.usp.br/Downloads/MySQL-5.0/mysql-$pkgver.tar.gz)

build() {
  # PIC
  export CFLAGS="-fPIC ${CFLAGS}"
  cd $startdir/src/mysql-${pkgver}
  ./configure --prefix=/usr --libexecdir=/usr/sbin \
    --localstatedir=/var --sysconfdir=/etc \
    --without-debug --without-docs --without-bench --without-readline \
    --with-innodb --enable-local-infile --with-ssl \
    --with-charset=latin1 --with-collation=latin1_general_ci \
    --with-extra-charsets=complex --enable-thread-safe-client \
    --with-libwrap --with-berkeley-db

  for dir in include strings regex mysys dbug extra; do
    pushd ${dir} || return 1
    make || return 1
    popd
  done
  for dir in libmysql libmysql_r; do
    pushd ${dir} || return 1
    make link_sources
    make || return 1
    make DESTDIR=${startdir}/pkg install
    popd
  done
  cd include
  make DESTDIR=${startdir}/pkg install

  cd ../scripts
  make mysql_config
  mkdir -p ${startdir}/pkg/usr/bin
  install -m755 mysql_config ${startdir}/pkg/usr/bin
  
  # create library symlinks in /usr/lib
  ln -sf mysql/libmysqlclient.so.15 $startdir/pkg/usr/lib/libmysqlclient.so.15
  ln -sf libmysqlclient.so.15 $startdir/pkg/usr/lib/libmysqlclient.so
  ln -sf libmysqlclient.so.15 $startdir/pkg/usr/lib/libmysqlclient.so.1
  ln -sf mysql/libmysqlclient_r.so.15 $startdir/pkg/usr/lib/libmysqlclient_r.so.15
  ln -sf libmysqlclient_r.so.15 $startdir/pkg/usr/lib/libmysqlclient_r.so
  ln -sf libmysqlclient_r.so.15 $startdir/pkg/usr/lib/libmysqlclient_r.so.1
}
md5sums=('a234f0a60a7f8c290d9875cba3a2c5a2')