# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=signon-ui
pkgver=0.17+20231016
pkgrel=3
_commit=eef943f0edf3beee8ecb85d4a9dae3656002fc24
pkgdesc='UI component responsible for handling the user interactions which can happen during the login process of an online account'
arch=(x86_64)
url='https://launchpad.net/online-accounts-signon-ui'
license=(GPL-3.0-only)
depends=(gcc-libs
         glib2
         glibc
         libaccounts-qt
         libnotify
         libproxy
         qt6-base
         qt6-declarative
         qt6-webengine
         signond)
makedepends=(git)
source=(git+https://gitlab.com/accounts-sso/signon-ui#commit=$_commit)
sha256sums=('f89a79a4a7619c8d415c39b6d377aebb92d898cfb126c211b756e5b8624c5ae7')

prepare() {
  cd $pkgname

  # Do not install tests
  sed -e 's|src \\|src|' -e '/tests/d' -i signon-ui.pro
}

build() {
  cd $pkgname

  qmake6 \
    PREFIX=/usr \
    LIBDIR=/usr/lib
  make
}

package() {
  cd $pkgname

  make INSTALL_ROOT="$pkgdir" install
}
