1 # Contributor: Ionut Biru <ibiru@archlinux.org>
2 # Contributor: totoloco <totoloco at gmail _dot_com>
4 pkgname=mysql-workbench
8 pkgdesc="A cross-platform, visual database design tool developed by MySQL"
10 url="https://www.mysql.com/products/workbench/"
12 depends=('libzip' 'libmysqlclient' 'lua' 'gtkmm' 'libgl'
13 'libsigc++' 'python-paramiko' 'python-pexpect' 'libgnome-keyring')
14 makedepends=('boost' 'curl' 'mesa' 'python-sphinx')
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')
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'
38 --with-bundled-ctemplate \
44 pushd ext/mysql-utilities
45 python2 setup.py build
48 pushd ext/connector-python
49 python2 setup.py build
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
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')