# Maintainer: justforlxz <justforlxz@gmail.com>
pkgname=deepin-polkit-agent-git
pkgver=5.5.19.r1.gc3af637
pkgrel=1
sourcename=dde-polkit-agent
sourcetars=("$sourcename"_"$pkgver".tar.xz)
sourcedir="$sourcename"
pkgdesc='Deepin Polkit Agent'
arch=('x86_64' 'aarch64')
url="https://github.com/linuxdeepin/dde-polkit-agent"
license=('GPL3')
depends=('deepin-qt-dbus-factory-git' 'startdde-git' 'polkit-qt6' 'dtkcommon-git' 'dtkwidget-git' 'dtkwidget-git')
makedepends=('git' 'polkit-qt6' 'cmake' 'ninja')
conflicts=('deepin-polkit-agent')
provides=('deepin-polkit-agent')
groups=('deepin-git')
source=("${sourcetars[@]}")
sha512sums=('SKIP')

prepare() {
    cd $sourcedir
}

build() {
  cd $sourcedir
  cmake . -G Ninja \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DUSE_DEEPIN_POLKIT=OFF
  ninja
}

package() {
  cd $sourcedir
  DESTDIR="$pkgdir" ninja install
}
