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

pkgname=ktorrent
pkgver=5.1.2
pkgrel=1
pkgdesc="A powerful BitTorrent client for KDE"
arch=(x86_64)
url='https://www.kde.org/applications/internet/ktorrent/'
license=(GPL2)
depends=(libktorrent kcmutils knotifyconfig kross)
makedepends=(extra-cmake-modules kdoctools boost plasma-workspace kdnssd taglib syndication kplotting kdewebkit geoip)
optdepends=('plasma-workspace: shutdown plugin' 'kdnssd: zeroconf plugin' 'taglib: mediaplayer plugin' 'geoip: info widget plugin'
            'syndication: syndication plugin' 'kdewebkit: search plugin, syndication plugin' 'kplotting: statistics plugin')
source=("https://download.kde.org/stable/$pkgname/$pkgver/$pkgname-$pkgver.tar.xz"{,.sig})
sha256sums=('641427a3d6ecb18b0b28c1cc2ec3ba54612abf684df5e10e6c953cd7af058d4f'
            'SKIP')
validpgpkeys=(1EE5A3205904BAA2B88C0A9D24FD31940095C0E1) # Andrius Štikonas <andrius@stikonas.eu>

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../$pkgname-$pkgver \
    -DWITH_SYSTEM_GEOIP=ON
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
}
