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

pkgname=dtkcommon
pkgver=5.5.17
pkgrel=1
pkgdesc='DTK common files'
arch=('any')
url="https://github.com/linuxdeepin/dtkcommon"
license=('LGPL3')
depends=('dconf')
makedepends=('qt5-tools')
source=("https://github.com/linuxdeepin/dtkcommon/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('c5099ed9429dd8ea8748302ffff19ca5af2ab3cdfc50f33d5cd19c86c47187136544a08026e6d81c7449e747047b5154729894774b951e0d747a080aea40fecc')

prepare() {
  cd dtkcommon-$pkgver
  sed -i 's|qt5/mkspecs|qt/mkspecs|;s|/etc/dbus-1|/usr/share/dbus-1|' dtkcommon.pro
}

build() {
  cd dtkcommon-$pkgver
  qmake-qt5 PREFIX=/usr VERSION=$pkgver LIB_INSTALL_DIR=/usr/lib
  make
}

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