# Contributor: Anton Bazhenov <anton.bazhenov at gmail>
# Contributor: Andrea Agosti <cifvts@gmail.com>

pkgname=bouml
pkgver=4.21
pkgrel=1
pkgdesc='A free UML 2 modeler with C++, Idl, Java, PHP and Python code generation'
arch=('i686' 'x86_64')
options=('makeflags')
url='http://bouml.free.fr/'
license=('GPL')
depends=('qt3')
source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/${pkgver}/${pkgname}_${pkgver}.tar.gz")
md5sums=('b3860354f9b8ba79994a9bde7872e946')

build() {
  cd "$srcdir"/${pkgname}_$pkgver

  # we need Qt3
  . /etc/profile.d/qt3.sh || return 1
  export PATH="$QTDIR/bin:$PATH"

  # export qmakespec
  if [ `uname -m` = "x86_64" ]; then
    export QMAKESPEC="linux-g++-64"
  else
    export QMAKESPEC="linux-g++-32"
  fi

  # make and install
  make || return 1
  make -I"$QTDIR/include" DESTDIR="$pkgdir" install || return 1
}