# Maintainer (arch): Ronald van Haren <ronald.archlinux.org>
# Contributor: Travis Willard <travisw@wmpub.ca>
# Contributor: Georg Grabler <ggrabler@gmail.com>
# Maintainer: Parabola Hackers <dev@lists.parabola.nu>
# Contributor: SolveFinder <kwopleq@proton.me>


# parabola changes and rationoale:
# - build without 'qt6-webengine' (search feature)


pkgname=ktorrent
pkgver=24.02.0
pkgrel=1
pkgrel+=.parabola1
pkgdesc='A powerful BitTorrent client for KDE'
arch=(x86_64)
arch+=(armv7h i686)
url='https://apps.kde.org/ktorrent/'
# license=(GPL-2.0-or-later) # TODO:
license=(GPL)
depends=(gcc-libs
         glibc
         karchive
         kcmutils
         kcompletion
         kconfig
         kconfigwidgets
         kcoreaddons
         kcrash
         kdbusaddons
         kglobalaccel
         ki18n
         kiconthemes
         kio
         knotifications
         knotifyconfig
         kparts
         kstatusnotifieritem
         ktextwidgets
         kwidgetsaddons
         kwindowsystem
         kxmlgui
         libmaxminddb
         libktorrent
         phonon-qt6
         qt6-5compat
         qt6-base
         qt6-webengine)
depends=( ${depends[*]/qt6-webengine/} )
makedepends=(boost
             extra-cmake-modules
             kdnssd
             kdoctools
             kplotting
             syndication
             taglib)
optdepends=('kdnssd: zeroconf plugin'
            'kplotting: statistics plugin'
            'syndication: syndication plugin'
            'taglib: mediaplayer plugin')
groups=(kde-applications
        kde-network)
source=(https://download.kde.org/stable/release-service/$pkgver/src/$pkgname-$pkgver.tar.xz{,.sig})
sha256sums=('03845a7efe778d4dc7ed396f284f09d6707d506d6b3a64039ec64baca589305a'
            '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
  cmake --build build
}

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