# $Id: PKGBUILD 52180 2009-09-16 12:23:19Z giovanni $ # Maintainer: Douglas Soares de Andrade pkgname=libmysqlclient pkgver=5.1.38 pkgrel=1 pkgdesc="MySQL client libraries" arch=(i686 x86_64) depends=('openssl' 'zlib' 'gcc-libs' 'tcp_wrappers') makedepends=('readline' 'libtool') options=('!libtool') license=('GPL') url=('http://www.mysql.com/') source=(ftp://mirror.switch.ch/mirror/mysql/Downloads/MySQL-5.1/mysql-$pkgver.tar.gz) build() { # fix build with gcc 4.4 # see http://bugs.archlinux.org/task/15242 # and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38562 CFLAGS="-fPIC ${CFLAGS} -fno-strict-aliasing" CXXFLAGS="-fPIC ${CXXFLAGS} -fno-strict-aliasing" cd $startdir/src/mysql-${pkgver} ./configure --prefix=/usr --libexecdir=/usr/sbin \ --localstatedir=/var --sysconfdir=/etc \ --without-debug --without-docs --without-readline \ --enable-local-infile --with-ssl \ --with-charset=latin1 --with-collation=latin1_general_ci \ --with-extra-charsets=complex --enable-thread-safe-client \ --with-embedded-server --with-libwrap --with-pic for dir in include strings mysys dbug storage regex extra vio sql; do pushd ${dir} || return 1 make || return 1 popd done for dir in libmysql libmysql_r libmysqld; 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 # Copy missing includes install -m644 *.h $pkgdir/usr/include/mysql 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.16 $startdir/pkg/usr/lib/libmysqlclient.so.16 ln -sf libmysqlclient.so.16 $startdir/pkg/usr/lib/libmysqlclient.so ln -sf libmysqlclient.so.16 $startdir/pkg/usr/lib/libmysqlclient.so.1 ln -sf mysql/libmysqlclient_r.so.16 $startdir/pkg/usr/lib/libmysqlclient_r.so.16 ln -sf libmysqlclient_r.so.16 $startdir/pkg/usr/lib/libmysqlclient_r.so ln -sf libmysqlclient_r.so.16 $startdir/pkg/usr/lib/libmysqlclient_r.so.1 } md5sums=('8ee9bb80079bbd09499a28bc57d902e7')