# Maintainer: Christian Hesse <mail@eworm.de>
# Contributor: Alexandre Boily <alexandreboily@gmail.com>
# Contributor: Illarion Kovalchuk <illarion.kovalchuk@gmail.com>
# Contributor: totoloco <totoloco at gmail _dot_com>
# Contributor: Ionut Biru <ibiru@archlinux.org>
pkgname=mysql-workbench
pkgver=6.1.4
pkgrel=5
pkgdesc="A cross-platform, visual database design tool developed by MySQL"
arch=('i686' 'x86_64')
url="https://www.mysql.com/products/workbench/"
license=('GPL2')
depends=('python2' 'libzip' 'libmariadbclient' 'lua51' 'gtkmm' 'ctemplate'
'libgnome-keyring' 'libgl' 'python2-paramiko' 'python2-pexpect'
'pcre' 'tinyxml' 'libxml2' 'mysql-python' 'python2-pysqlite' 'cairo'
'python-cairo' 'hicolor-icon-theme' 'desktop-file-utils' 'libiodbc'
'mysql-connector-c++' 'vsqlite++' 'unixodbc' 'freetype2' 'libantlr3c')
optdepends=('gnome-keyring: store SSH/MySQL passwords in GNOME password manager'
'python2-pyodbc: database migration')
makedepends=('cmake' 'boost' 'curl' 'mesa' 'imagemagick' 'swig')
options=('!distcc !ccache')
install=mysql-workbench.install
source=("http://cdn.mysql.com/Downloads/MySQLGUITools/${pkgname}-community-${pkgver}-src.tar.gz"{,.asc}
'no-check-for-updates.patch'
'mysql-workbench-admin_ssh.patch'
'ctemplate.patch'
'arch_linux_profile.xml')
prepare() {
cd "${srcdir}/${pkgname}-community-${pkgver}-src/"
# Disable 'Help' -> 'Check for Updates'
patch -Np1 < "${srcdir}"/no-check-for-updates.patch
# fix empty management tab
# http://bugs.mysql.com/bug.php?id=72194
patch -Np1 < "${srcdir}"/mysql-workbench-admin_ssh.patch
# fix deprecated calls to tpl->ReloadIfChanged
patch -Np1 < "${srcdir}"/ctemplate.patch
}
build() {
cd "${srcdir}/${pkgname}-community-${pkgver}-src/"
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .
# fix path to lua include files
# is this a bug by cmake? (/usr/share/cmake-2.8/Modules/FindLua51.cmake)
sed -i '/^LUA_INCLUDE_DIR:PATH=/c LUA_INCLUDE_DIR:PATH=/usr/include/lua5.1' CMakeCache.txt
# fix detection of Python
sed -i 's|python3.3m|python2.7|' CMakeCache.txt
make
}
package() {
cd "${srcdir}/${pkgname}-community-${pkgver}-src"
make DESTDIR="${pkgdir}" install
# generate icons
for SIZE in 16 24 32 48 64 96 128 160 192 256 384 512; do
if [ ! -s images/icons/MySQLWorkbench-${SIZE}.png ]; then
convert -scale ${SIZE} \
images/icons/MySQLWorkbench-512.png \
images/icons/MySQLWorkbench-${SIZE}.png
fi
install -D -m0644 images/icons/MySQLWorkbench-${SIZE}.png \
"${pkgdir}/usr/share/icons/hicolor/${SIZE}x${SIZE}/apps/mysql-workbench.png"
done
install -D -m 0644 "${srcdir}"/arch_linux_profile.xml "${pkgdir}"/usr/share/mysql-workbench/mysql.profiles/Arch_Linux_\(MariaDB_5.5_Package\).xml
}
sha256sums=('2e9b73d8a800341916fbc2d9d347c856408ffef4fe71bcc7786ad88d08302a2b'
'SKIP'
'996482e15d88af097f5e7a578885338cad5b8724f8abb4341749d5538801f5c0'
'0c45db0d9c8a0f0bb07d096b3ed3b249b7e8ed1d02d07a9809f48c7c3402a09c'
'cd54895c38a618b8b3d6bbc72fd95a7df930914d9e641c59898c88aa60fb3d0f'
'1aa3cc7bf83470e81eca766114a597fa57542316818732011c8ea67e52197c7e')