# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>

pkgname=sdcv
pkgver=0.5.3
pkgrel=1
pkgdesc="StarDict Console Version"
arch=('x86_64')
url="https://dushistov.github.io/sdcv/"
license=('GPL')
depends=('glib2' 'readline' 'zlib')
makedepends=('cmake')
provides=('stardict')
changelog=$pkgname.changelog
source=($pkgname-$pkgver.tar.gz::https://github.com/Dushistov/$pkgname/archive/v$pkgver.tar.gz)
sha256sums=('75fb95b1607fdd2fb9f7795d3432d295904614150575ae539202f680499803c9')

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

  install -d build
  cd build

  cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
  make
  make lang
}

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

  make DESTDIR="${pkgdir}" install
}
