# $Id: PKGBUILD 117484 2014-08-17 19:42:09Z arcanis $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: shamrok <szamrok@gmail.com>
# Contributor: G_Syme <demichan(at)mail(dot)upb(dot)de>
# Contributor: Adrià Arrufat <swiftscythe@gmail.com>

pkgname=krecipes
pkgver=2.0beta2
_pkgver=2.0-beta2
pkgrel=5
pkgdesc="A tool designed to make organizing your personal recipes collection fast and easy"
arch=('i686' 'x86_64')
url="http://extragear.kde.org/apps/krecipes/"
license=('GPL')
depends=('kdebase-runtime' 'qimageblitz' 'hicolor-icon-theme')
makedepends=('cmake' 'automoc4' 'docbook-xsl')
optdepends=('mariadb' 'postgresql')
install=${pkgname}.install
source=(https://downloads.sourceforge.net/${pkgname}/${pkgname}-${_pkgver}.tar.gz
        https://sourceforge.net/p/${pkgname}/patches/10/attachment/${pkgname}-tr.tar.gz)
md5sums=('4c01ccad7ad1409cb35c824a61250fe2'
         'f33f648df70c93f95fc32d50d0e12d7f')

prepare() {
  # include additional translations
  # see https://sourceforge.net/p/krecipes/patches/10/
  cp -r ${pkgname}-tr/po/ ${pkgname}-2.0-beta2/
  patch -p0 -i ${pkgname}-tr/krecipes-tr.patch
}

build() {
  cd ${srcdir}

  mkdir build
  cd build

  cmake ../${pkgname}-${_pkgver} \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr
  make
}

package() {
  cd ${srcdir}/build

  make DESTDIR=${pkgdir} install
}
