summaryrefslogtreecommitdiffstats
path: root/abs/core/mysql/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/mysql/PKGBUILD')
-rw-r--r--abs/core/mysql/PKGBUILD153
1 files changed, 103 insertions, 50 deletions
diff --git a/abs/core/mysql/PKGBUILD b/abs/core/mysql/PKGBUILD
index c91ac41..ed65173 100644
--- a/abs/core/mysql/PKGBUILD
+++ b/abs/core/mysql/PKGBUILD
@@ -1,56 +1,109 @@
-# $Id: PKGBUILD 23595 2009-01-11 13:14:19Z douglas $
-# Maintainer: Alexander Baldeck <alexander@archlinux.org>
+# $Id: PKGBUILD 88432 2010-08-23 17:32:08Z pierre $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
-pkgname=mysql
-pkgver=5.0.75
-pkgrel=4
-pkgdesc="A fast SQL database server"
-arch=(i686 x86_64)
-backup=(etc/my.cnf etc/conf.d/mysqld)
-depends=("mysql-clients>=${pkgver}" 'tcp_wrappers')
-makedepends=('libtool')
-url=('http://www.mysql.com/')
-options=('!libtool')
-optdepends=('perl-dbi' 'perl-dbd-mysql')
+
+pkgbase=mysql
+pkgname=('libmysqlclient' 'mysql-clients' 'mysql')
+pkgver=5.1.50
+pkgrel=1
+arch=('i686' 'x86_64')
license=('GPL')
-source=(ftp://ftp.pucpr.br/mysql/Downloads/MySQL-5.0/mysql-${pkgver}.tar.gz
- mysql-no-clients.patch
- mysqld
- my.cnf
- mysqld.conf.d)
+url="http://www.mysql.com/"
+makedepends=('tcp_wrappers' 'zlib' 'perl' 'openssl' 'libtool' 'patch')
+options=('!libtool')
+source=("http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.1/${pkgbase}-${pkgver}.tar.gz"
+ 'mysqld'
+ 'my.cnf'
+ 'skip-abi-check.patch')
build() {
- # PIC
- cd ${startdir}/src/${pkgname}-${pkgver}
- patch -Np1 -i ${startdir}/src/mysql-no-clients.patch || return 1
- ./configure --prefix=/usr --libexecdir=/usr/sbin \
- --without-debug --without-docs --without-bench --without-readline \
- --with-innodb --enable-local-infile --with-openssl \
- --with-charset=latin1 --with-collation=latin1_general_ci \
- --with-extra-charsets=complex --enable-thread-safe-client \
- --with-libwrap --with-berkeley-db --with-embedded-server
-
- # fixes
- sed -i -e 's/^.*HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE.*$/#define\ HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE/g' include/config.h || return 1
- sed -i -e 's/size_socket/socklen_t/g' sql/mysqld.cc || return 1
-
- pushd include || return
- make || return 1
- popd
- pushd libmysql
- make link_sources get_password.lo || return
- popd
- make || return 1
- make DESTDIR=${startdir}/pkg install
- rm -rf ${startdir}/pkg/usr/{mysql-test,sql-bench}
- install -D -m644 ../my.cnf ${startdir}/pkg/etc/my.cnf
- install -D -m755 ../mysqld ${startdir}/pkg/etc/rc.d/mysqld
- install -D -m644 ../mysqld.conf.d ${startdir}/pkg/etc/conf.d/mysqld
- rm -f ${startdir}/pkg/usr/bin/mysql_config
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ patch -Np0 -i "${srcdir}/skip-abi-check.patch"
+ # CFLAGS/CXXFLAGS as suggested upstream
+ CFLAGS="-fPIC ${CFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -fomit-frame-pointer" \
+ CXXFLAGS="-fPIC ${CXXFLAGS} -fno-strict-aliasing -DBIG_JOINS=1 -felide-constructors -fno-rtti" \
+ ./configure --prefix=/usr \
+ --libexecdir=/usr/sbin \
+ --localstatedir=/var \
+ --sysconfdir=/etc/mysql \
+ --without-docs \
+ --without-readline \
+ --with-ssl \
+ --with-libwrap \
+ --with-charset=utf8 \
+ --with-collation=utf8_general_ci \
+ --with-extra-charsets=complex \
+ --with-embedded-server \
+ --with-unix-socket-path=/var/run/mysqld/mysqld.sock \
+ --enable-local-infile \
+ --with-plugins=partition,ftexample,archive,blackhole,federated,heap,innobase,innodb_plugin,ndbcluster
+ make
+}
+
+package_libmysqlclient(){
+ pkgdesc="MySQL client libraries"
+ depends=('openssl' 'zlib' 'gcc-libs' 'tcp_wrappers')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ for dir in include libmysql libmysql_r libmysqld; do
+ make -C ${dir} DESTDIR="${pkgdir}" install
+ done
+ install -m644 include/*.h "${pkgdir}/usr/include/mysql/"
+
+ install -d "${pkgdir}/usr/bin"
+ install -m755 scripts/mysql_config "${pkgdir}/usr/bin/"
+
+ # create library symlinks in /usr/lib
+ ln -sf mysql/libmysqlclient.so.16 ${pkgdir}/usr/lib/libmysqlclient.so.16
+ ln -sf libmysqlclient.so.16 ${pkgdir}/usr/lib/libmysqlclient.so
+ ln -sf libmysqlclient.so.16 ${pkgdir}/usr/lib/libmysqlclient.so.1
+ ln -sf mysql/libmysqlclient_r.so.16 ${pkgdir}/usr/lib/libmysqlclient_r.so.16
+ ln -sf libmysqlclient_r.so.16 ${pkgdir}/usr/lib/libmysqlclient_r.so
+ ln -sf libmysqlclient_r.so.16 ${pkgdir}/usr/lib/libmysqlclient_r.so.1
}
-md5sums=('a234f0a60a7f8c290d9875cba3a2c5a2'
- 'e892aac36cbeb57f0e003ec0936afb3b'
- 'cfff3585dd70cde3ac1ce69e64008733'
- '078f6e824d6097d558bcf7c16d508d92'
- 'd81d1f51e9ee6941425a63456d07cb21')
+package_mysql-clients(){
+ pkgdesc="MySQL client tools"
+ depends=('libmysqlclient')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}/client"
+ make DESTDIR="${pkgdir}" install
+
+ # provided by libmysqlclient
+ rm -rf "${pkgdir}/usr/lib/"
+
+ # provided by mysql
+ rm -f "${pkgdir}"/usr/bin/{mysql_upgrade,mysqlbinlog,mysqltest}
+}
+
+package_mysql(){
+ pkgdesc="A fast SQL database server"
+ backup=('etc/my.cnf' 'etc/mysql/my.cnf')
+ install=mysql.install
+ depends=('mysql-clients')
+ optdepends=('perl-dbi' 'perl-dbd-mysql')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+ make DESTDIR=${pkgdir} install
+
+ install -Dm644 ${srcdir}/my.cnf ${pkgdir}/etc/mysql/my.cnf
+ install -Dm755 ${srcdir}/mysqld ${pkgdir}/etc/rc.d/mysqld
+
+ # provided by libmysqlclient
+ rm -f ${pkgdir}/usr/bin/{mysql_config,mysql_client_test_embedded,mysqltest_embedded}
+ rm -f ${pkgdir}/usr/lib/mysql/libmysqlclient*
+ rm -f ${pkgdir}/usr/lib/mysql/libmysqld.a
+ rm -f ${pkgdir}/usr/include/mysql/*.h
+
+ # provided by mysql-clients
+ rm -f ${pkgdir}/usr/bin/{mysql,mysqladmin,mysqlcheck,mysqldump,mysqlimport,mysqlshow,mysqlslap}
+
+ # not needed
+ rm -rf ${pkgdir}/usr/{mysql-test,sql-bench}
+ rm -f ${pkgdir}/usr/lib/mysql/plugin/*.a
+}
+md5sums=('23bac4a0aafd683b077dac146ce2701f'
+ '2234207625baa29b2ff7d7b4f088abce'
+ '175b269b665019689d786f5af0968046'
+ 'a97e574945e19de3908575b956241026')