# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

_name=kwallet
pkgname=${_name}5
pkgver=5.116.0
pkgrel=5
pkgdesc='Secure and unified container for user passwords'
arch=(x86_64)
url='https://community.kde.org/Frameworks'
license=(LGPL)
depends=(gcc-libs
         glibc
         kconfig5
         kwindowsystem5
         qt5-base)
makedepends=(extra-cmake-modules
             kcoreaddons5
             ki18n5)
optdepends=('kwalletmanager: Configuration GUI')
conflicts=("$_name<5.111")
replaces=("$_name<5.111")
replaces+=(kwallet-secrets)
groups=(kf5)
source=(https://download.kde.org/stable/frameworks/${pkgver%.*}/$_name-$pkgver.tar.xz{,.sig})
sha256sums=('1ece8b5ecb2bc86ac6d9f55c7fa60f3099513732b6ed367895ec36b5bccd448b'
            'SKIP')
validpgpkeys=(53E6B47B45CEA3E0D5B7457758D0EE648A48B3BB) # David Faure <faure@kde.org>

build() {
  cmake -B build -S $_name-$pkgver \
    -DBUILD_TESTING=OFF \
    -DBUILD_KWALLET_QUERY=OFF \
    -DBUILD_KWALLETD=OFF
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
