# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: William Rea <sillywilly@gmail.com>

pkgname=gwenhywfar
pkgver=5.14.1
pkgrel=1
pkgdesc="OS abstraction functions for various projects"
arch=('x86_64')
url="https://www.aquamaniac.de/rdm/"
license=('LGPL')
depends=('gnutls' 'libgcrypt' 'openssl')
makedepends=('git' 'gtk3' 'qt6-base')
optdepends=('gtk3: for the GTK3 UI'
            'qt6-base: for the Qt6 UI')
source=(https://www.aquamaniac.de/rdm/attachments/download/630/$pkgname-$pkgver.tar.gz
        https://www.aquamaniac.de/rdm/attachments/download/629/$pkgname-$pkgver.tar.gz.asc)
sha256sums=('8916feaa99cb954f963f2cba8dd2dffe57cacf7f284daf00eab071aad6fe2ab3'
            'SKIP')
validpgpkeys=(42400AF5EB2A17F0A69BB551E9899D784A977416) # AqBanking Package Key <packages@aqbanking.de>

build() {
  cd $pkgname-$pkgver
  GPGRT_CONFIG="/usr/bin/gpgrt-config" \
  PATH="/usr/lib/qt6/bin:$PATH" \
  ./configure --prefix=/usr --sysconfdir=/etc --enable-system-certs --with-guis="gtk3 qt5"
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="${pkgdir}" install
}
