# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
# Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com>

pkgname=deepin-calendar
pkgver=5.8.4
pkgrel=1
pkgdesc='Calendar for Deepin Desktop Environment'
arch=('x86_64')
url="https://github.com/linuxdeepin/dde-calendar"
license=('GPL3')
depends=('deepin-qt5integration' 'hicolor-icon-theme')
makedepends=('cmake' 'gmock' 'gtest' 'ninja' 'qt5-tools')
groups=('deepin')
source=("https://github.com/linuxdeepin/dde-calendar/archive/$pkgver/$pkgname-$pkgver.tar.gz"
        "dde-calendar-icon.patch")
sha512sums=('334e9e549ada4f1ea39f1347649a77cf3c6e0bd189669a649ac2b394bd30b0a125e87f8c13c741bd712390d14213f5a89e5dab59d78ae12a5f478f127cc97cc6'
            '40ffae29fcbd386512dac9b91c39219b420b349f1f5facc254467b9e5407091886c8d0ed0979d566ba79539c093464cbc7719da7268c9745bc30273f9d7db7e2')

prepare() {
  cd dde-calendar-$pkgver

  # Install the application icon
  # https://github.com/linuxdeepin/dde-calendar/pull/31
  # patch -Np1 -i ../dde-calendar-icon.patch
}

build() {
  cd dde-calendar-$pkgver
  cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr .
  ninja
}

package() {
  cd dde-calendar-$pkgver
  DESTDIR="$pkgdir" ninja install
}
