# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Travis Willard <travisw@wmpub.ca>
# Contributor: Georg Grabler <ggrabler@gmail.com>

pkgname=ktorrent
pkgver=21.08.1
pkgrel=1
pkgdesc='A powerful BitTorrent client for KDE'
arch=(x86_64)
url='https://apps.kde.org/ktorrent/'
license=(GPL2)
depends=(libktorrent kcmutils knotifyconfig kross phonon-qt5 qt5-webengine)
makedepends=(extra-cmake-modules kdoctools boost plasma-workspace kdnssd taglib syndication kplotting geoip)
optdepends=('plasma-workspace: shutdown plugin' 'kdnssd: zeroconf plugin' 'taglib: mediaplayer plugin' 'geoip: info widget plugin'
            'syndication: syndication plugin' 'kplotting: statistics plugin')
groups=(kde-applications kde-network)
source=(https://download.kde.org/stable/release-service/$pkgver/src/$pkgname-$pkgver.tar.xz{,.sig})
sha256sums=('356d55f28c52fe1c658c20da1c806c4b878d9fccf0ad269027c97fa2ed20fce4'
            'SKIP')
validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7  # Albert Astals Cid <aacid@kde.org>
              F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87  # Christoph Feck <cfeck@kde.org>
              D81C0CB38EB725EF6691C385BB463350D6EF31EF) # Heiko Becker <heiko.becker@kde.org>

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DWITH_SYSTEM_GEOIP=ON
  cmake --build build
}

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