summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a7042aa06a16c07d4e9e2bf9fede4981e2a7c285 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Maintainer: Gustavo Alvarez <sl1pkn07@gmail.com>

pkgname=ktorrent-git
pkgver=24.04.70.r3267.177a8d69
pkgrel=1
pkgdesc="A powerful BitTorrent client. (GIT version)"
arch=('x86_64')
url='https://apps.kde.org/ktorrent'
license=('GPL')
depends=(
  'gcc-libs' # libgcc_s.so libstdc++.so
  'glibc' # libc.so libm.so
  'libktorrent' 'libKTorrent6.so'
  'qt6-base' # libQt6Core.so libQt6DBus.so libQt6Gui.so libQt6Network.so  libQt6Widgets.so libQt6Xml.so
  'qt6-5compat' # libQt6Core5Compat.so
  'knotifyconfig' # libKF6NotifyConfig.so
  'kcmutils' # libKF6KCMUtils.so
  'kcompletion' # libKF6Completion.so
  'kconfig' #libKF6ConfigCore.so libKF6ConfigGui.so
  'kconfigwidgets' # libKF6ConfigWidgets.so
  'kcoreaddons' # libKF6CoreAddons.so
  'kcrash' # libKF6Crash.so
  'kdbusaddons' # libKF6DBusAddons.so
  'ki18n' # libKF6I18n.so
  'kiconthemes' # libKF6IconThemes.so
  'kio' # libKF6KIOCore.so libKF6KIOGui.so libKF6KIOWidgets.so
  'knotifications' # libKF6Notifications.so
  'kparts' # libKF6Parts.so
  'kwidgetsaddons' # libKF6WidgetsAddons.so
  'kwindowsystem' # libKF6WindowSystem.so
  'kxmlgui' # libKF6XmlGui
  'kstatusnotifieritem' # libKF6StatusNotifierItem.so
  'kglobalaccel' # libKF6GlobalAccel.so
  'hicolor-icon-theme'
)
makedepends=(
  'git'
  'extra-cmake-modules'
  'qt6-tools'
  'kdoctools'
  'python'
  'boost'
  'taglib'
  'libmaxminddb'
  'qt5-webengine'
  'phonon-qt6'
  'plasma-workspace'
  'kdnssd'
  'kplotting'
  'karchive'
  'syndication'
  'ktextwidgets'
)
optdepends=(
  'karchive: for ipfilter plugin'
  'ktextwidgets: for ipfilter plugin'
  'plasma-workspace: for shutdown plugin'
  'kplotting: for stats plugin'
  'libmaxminddb: for infowidget plugin'
  'kdnssd: for zeroconf plugin'
  'taglib: for mediaplayer plugin'
  'phonon-qt6: for multimedia plugin'
  'qt6-webengine: for search and RSS plugin'
  'syndication: for RSS plugin'
)
checkdepends=('appstream')
provides=(
  'ktorrent'
  'libktcore.so'
)
conflicts=('ktorrent')
source=(
  'git+https://invent.kde.org/network/ktorrent.git'
  'https://invent.kde.org/network/ktorrent/-/merge_requests/57.diff'
)
sha256sums=(
  'SKIP'
  'SKIP'
)
options=('debug')

pkgver() {
  cd ktorrent
  _ver="$(cat CMakeLists.txt | grep -m3 -e RELEASE_SERVICE_VERSION_MAJOR -e RELEASE_SERVICE_VERSION_MINOR -e RELEASE_SERVICE_VERSION_MICRO | grep -o "[[:digit:]]*" | paste -sd'.')"
  echo "${_ver}.r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

prepare() {
  patch -d ktorrent -p1 -i "${srcdir}/57.diff"
}

build() {
  cmake -S ktorrent -B build \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DBUILD_TESTING=ON

  cmake --build build
}

check() {
  ctest --test-dir build --output-on-failure
}

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