# Contributor: Evgeniy Alekseev <esalexeev@gmail.com>
# Contributor: giacomogiorgianni@gmail.com

pkgname=katecpp-helper-plugin
_name=KateCppHelperPlugin
pkgver=1.0.1
pkgrel=1
pkgdesc="Kate C++ Helper plugin"
arch=('i686' 'x86_64')
url="https://github.com/zaufi/kate-cpp-helper-plugin"
license=('GPL')
depends=('boost' 'clang>=3.3' 'kdesdk-kate' 'xapian-core')
makedepends=('automoc4' 'cmake')
conflicts=('kateinclude-helper-plugin')
provides=('kateinclude-helper-plugin')
replaces=('kateinclude-helper-plugin')
source=("http://kde-apps.org/CONTENT/content-files/148606-${_name}-${pkgver}.tar.bz2")
md5sums=('f355c453515817b504a2be77fae326a1')

build()
{
  if [[ -d ${srcdir}/build ]]; then
    rm -rf "${srcdir}/build"
  fi
  mkdir "${srcdir}/build"; cd "${srcdir}/build"
  cmake -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4 \
        -DBUILD_TESTING=OFF \
        -DNO_DOXY_DOCS=ON \
        -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` \
        "../${_name}-${pkgver}"
  make
}

package()
{
  cd "${srcdir}/build"
  make DESTDIR="${pkgdir}" install
}
