# $Id: PKGBUILD 240057 2015-06-02 06:57:59Z arojas $
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=kmplot
pkgver=15.04.2
pkgrel=1
pkgdesc="Mathematical Function Plotter"
url="http://kde.org/applications/education/kmplot/"
arch=('i686' 'x86_64')
license=('GPL' 'LGPL' 'FDL')
groups=('kde-applications' 'kdeedu')
depends=('kdelibs4support')
makedepends=('extra-cmake-modules' 'python' 'kdoctools')
install=${pkgname}.install
replaces=('kdeedu-kmplot')
conflicts=('kdeedu-kmplot')
source=("http://download.kde.org/stable/applications/${pkgver}/src/kmplot-${pkgver}.tar.xz")
sha1sums=('95b6848bd676a716ee4ebb8a0634e12ffc0913a1')

build() {
  cd "${srcdir}"
  mkdir build
  cd build
  cmake ../kmplot-${pkgver} \
    -DCMAKE_BUILD_TYPE=Release \
    -DBUILD_TESTING=OFF \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
  make
}

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