# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=signon-plugin-oauth2
_pkgname=signon-oauth2
pkgver=0.25
pkgrel=3
pkgdesc='OAuth 2 plugin for signon'
arch=(x86_64)
url='https://gitlab.com/accounts-sso/signon-plugin-oauth2'
license=(LGPL)
depends=(gcc-libs
         glibc
         qt6-base
         signond)
makedepends=(git)
# source=(https://gitlab.com/accounts-sso/signon-plugin-oauth2/-/archive/VERSION_$pkgver/signon-plugin-oauth2-VERSION_$pkgver.tar.bz2)
_commit=fab698862466994a8fdc9aa335c87b4f05430ce6
source=(git+https://gitlab.com/nicolasfella/signon-plugin-oauth2#commit=$_commit)
sha256sums=('SKIP')

prepare() {
  cd $pkgname

  # Do not install tests and example
  echo 'INSTALLS =' >>tests/tests.pro
  echo 'INSTALLS =' >>example/example.pro
}

build() {
  cd $pkgname

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

package() {
  cd $pkgname

  make INSTALL_ROOT="$pkgdir" install
}
