# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=deepin-editor
pkgver=5.9.0.52
pkgrel=1
pkgdesc='Simple editor for Deepin'
arch=('x86_64')
url="https://github.com/linuxdeepin/deepin-editor"
license=('GPL3')
depends=('deepin-qt5integration' 'syntax-highlighting' 'kcodecs' 'polkit-qt5')
makedepends=('cmake' 'gmock' 'gtest' 'ninja' 'qt5-tools')
groups=('deepin-extra')
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/deepin-editor/archive/$pkgver.tar.gz")
sha512sums=('072536428fa43854b2d1fc7e8156cd0e1802d0a8f50ab8d8dce42f4bdf2ba49dd34bb23b08f1a2bb46f1cacf085d3e84ff899b53a8f47ca463abc972c8800086')

build(){
  cd deepin-editor-$pkgver
  cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .
  ninja
}

check() {
  cd deepin-editor-$pkgver
  ninja test
}

package() {
  cd deepin-editor-$pkgver
  DESTDIR="$pkgdir" ninja install
}
