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

pkgname=dtkwm
pkgver=2.0.12
pkgrel=10
pkgdesc='Deepin Tool Kit Wm'
arch=('x86_64')
url="https://github.com/linuxdeepin/dtkwm"
license=('GPL3')
depends=('dtkcore' 'qt5-x11extras')
makedepends=('qt5-tools')
source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/dtkwm/archive/$pkgver.tar.gz"
         dtk-module-name.patch::"https://github.com/linuxdeepin/dtkwm/commit/2490891a.patch")
sha512sums=('01189ae2a726ea98b851754e3cf7597f47202be47dd26253f6502c5278cb1559adba90a4219345a65f47c3e84cd8af86deb44b164af3a033bc7e621715632028'
            '109d32f26e30aba50a20153b67e3895fa03342d75aab4505c931b7272515de4f75870f3fa1d1ec387c05772bea9ea54d5718965e8bf9c4366db5622a467056eb')

prepare() {
  cd dtkwm-$pkgver
  patch -p1 -i ../dtk-module-name.patch # Fix build
}

build() {
  cd dtkwm-$pkgver
  qmake-qt5 PREFIX=/usr
  make
}

package() {
  cd dtkwm-$pkgver
  make INSTALL_ROOT="$pkgdir" install
}
