summaryrefslogtreecommitdiff
path: root/community/mysql-workbench/PKGBUILD
blob: 3c063eb1d28410f2423a628ae48c1d6b8166889a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# $Id: PKGBUILD 47963 2011-05-26 13:44:42Z ibiru $
# Maintainer:
# Contributor : Ionut Biru <ibiru@archlinux.org>
# Contributor: totoloco <totoloco at gmail _dot_com>

pkgname=mysql-workbench
epoch=1
pkgver=5.2.34
pkgrel=1
pkgdesc="A cross-platform, visual database design tool developed by MySQL"
arch=('i686' 'x86_64')
url="http://wb.mysql.com/"
license=('GPL2')
depends=('libzip' 'libmysqlclient' 'lua' 'gtkmm' 'libgl'
         'libsigc++' 'python-paramiko' 'python-pexpect')
makedepends=('boost' 'curl' 'mesa')
options=('!libtool')
source=(ftp://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQLGUITools/${pkgname}-gpl-${pkgver}-src.tar.gz
        ArchLinux.xml arch.patch python27.patch gcc46.patch)
md5sums=('781a4e9f6b5573b06a838d53ddb9136d'
         'c2f986cd5737413d020c55db32713c48'
         '23430d24400fd65c9fd872bd8e2411e5'
         '47bc4cdfaa035a0132392e94c462ebf7'
         '43917ebc79794ba15a64f7ba820fa20b')

build() {
  cd "${srcdir}/${pkgname}-gpl-${pkgver}-src"

  cp "${srcdir}/ArchLinux.xml" res/mysql.profiles
  patch -Np1 -i ${srcdir}/arch.patch

  patch -Np0 -i ${srcdir}/python27.patch
  patch -Np1 -i ${srcdir}/gcc46.patch

  #we use System provided libraries
  rm -rf ext/curl
  rm -rf ext/yassl
  rm -rf ext/boost
  rm -rf ext/libsigc++

  export CPPFLAGS=$(pkg-config --cflags sigc++-2.0)
  export CXXFLAGS="$CXXFLAGS -fpermissive"

  ./autogen.sh --prefix=/usr --disable-debug --disable-static
  make
}

package() {
  cd "${srcdir}/${pkgname}-gpl-${pkgver}-src"

  make DESTDIR="${pkgdir}" install
  sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" $pkgdir/usr/share/mysql-workbench/sshtunnel.py
  sed -i -e "s|python|python2|" $pkgdir/usr/lib/mysql-workbench/modules/wb_utils_grt.py
}