updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / mysql-workbench / PKGBUILD
blob2793af6a035ffaa6f31b4ae688cce6b3854ec465
1 # Contributor: Ionut Biru <ibiru@archlinux.org>
2 # Contributor: totoloco <totoloco at gmail _dot_com>
4 pkgname=mysql-workbench
5 epoch=1
6 pkgver=5.2.37
7 pkgrel=1
8 pkgdesc="A cross-platform, visual database design tool developed by MySQL"
9 arch=('i686' 'x86_64')
10 url="https://www.mysql.com/products/workbench/"
11 license=('GPL2')
12 depends=('libzip' 'libmysqlclient' 'lua' 'gtkmm' 'libgl'
13          'libsigc++' 'python-paramiko' 'python-pexpect' 'libgnome-keyring')
14 makedepends=('boost' 'curl' 'mesa' 'python-sphinx')
15 options=('!libtool')
16 source=(ftp://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQLGUITools/${pkgname}-gpl-${pkgver}-src.tar.gz
17         ArchLinux.xml arch.patch python27.patch gcc46.patch)
18 md5sums=('c7301f078834512538353ee3ce2cf460'
19          'c2f986cd5737413d020c55db32713c48'
20          '23430d24400fd65c9fd872bd8e2411e5'
21          'a3efb373bd85d876530a29bf1780fb6b'
22          '43917ebc79794ba15a64f7ba820fa20b')
24 build() {
25   cd "${srcdir}/${pkgname}-gpl-${pkgver}-src"
27   cp "${srcdir}/ArchLinux.xml" res/mysql.profiles
28   patch -Np1 -i ${srcdir}/arch.patch
30   patch -Np1 -i ${srcdir}/python27.patch
31   patch -Np1 -i ${srcdir}/gcc46.patch
33   # remove when http://bugs.mysql.com/bug.php?id=63898 gets fixed
34   fgrep -rlZ pkglib_DATA --include Makefile.am . | xargs -0 sed -i 's/pkglib_DATA/pkgdata_DATA/g'
36   ./autogen.sh \
37     --prefix=/usr \
38     --with-bundled-ctemplate \
39     --disable-debug \
40     --disable-static
42   make
44   pushd ext/mysql-utilities
45   python2 setup.py build
46   popd
48   pushd ext/connector-python
49   python2 setup.py build
50   popd
53 package() {
54   cd "${srcdir}/${pkgname}-gpl-${pkgver}-src"
56   make DESTDIR="${pkgdir}" install
58   pushd ext/mysql-utilities
59   python2 setup.py install --skip-profile --root $pkgdir --prefix=/usr --optimize=1
60   popd
62   pushd ext/connector-python
63   python2 setup.py install --root $pkgdir --prefix=/usr --optimize=1
65   sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
66       -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
67       -e "s|#![ ]*/bin/env python$|#!/usr/bin/env python2|" \
68       $(find ${pkgdir} -name '*.py')