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

pkgname=deepin-kwin
pkgver=0.1.0
pkgrel=2
pkgdesc='KWin configures on DDE'
arch=('x86_64')
url="https://github.com/linuxdeepin/dde-kwin"
license=('GPL3')
depends=('deepin-qt5integration' 'kwin')
makedepends=('cmake' 'expac' 'qt5-tools')
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/dde-kwin/archive/$pkgver.tar.gz")
sha512sums=('ae670e9f7763df5d614b39e6e0752e04a8ff56cfedaac06272a3a626fe61b3be11cc68d17fb6e2758d50b55a8895e9932d4a70720fcecd8c0e26737aa35a6061')

build() {
  cd dde-kwin-$pkgver
  cmake . -DCMAKE_INSTALL_PREFIX=/usr -DKWIN_VERSION=$(expac %v kwin | cut -d - -f 1)
  make
}

package() {
  cd dde-kwin-$pkgver
  make DESTDIR="$pkgdir" install

  chmod +x "$pkgdir"/usr/bin/kwin_no_scale
}
