# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=libaccounts-qt
pkgdesc='Qt-based client library for accessing the online accounts database'
pkgver=1.17
pkgrel=1
arch=(x86_64)
url='https://gitlab.com/accounts-sso/libaccounts-qt'
license=(LGPL-2.1-or-later)
depends=(gcc-libs
         glib2
         glibc
         libaccounts-glib
         qt6-base)
makedepends=(doxygen
             git)
source=(https://gitlab.com/accounts-sso/libaccounts-qt/-/archive/VERSION_$pkgver/libaccounts-qt-VERSION_$pkgver.tar.gz)
sha256sums=('6ed3e976133962c1c88f6c66928ba0d0a17a570843577d31e783dc891659e5d8')

prepare() {
  cd $pkgname-VERSION_$pkgver
  sed -i 's|SUBDIRS  += Accounts tests|SUBDIRS += Accounts|' accounts-qt.pro
}

build() {
  cd $pkgname-VERSION_$pkgver
  qmake6 PREFIX=/usr LIBDIR=/usr/lib
  make
}

package() {
  cd $pkgname-VERSION_$pkgver
  make INSTALL_ROOT="$pkgdir" install

# Remove docs
  rm -r "$pkgdir"/usr/share
}
