summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d19c6cd1725138c7452a5c496b13d8623a5a7ef3 (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
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=krdc-git
_pkgname=krdc
pkgver=24.07.70.r58.g7a0de69
pkgrel=1
pkgdesc='Remote Desktop Client'
url='https://apps.kde.org/krdc/'
arch=(x86_64)
license=(GPL-2.0-or-later LGPL-2.0-or-later)
depends=(gcc-libs
         glibc
         plasma-activities
         kbookmarks
         kcmutils
         kcompletion
         kconfig
         kconfigwidgets
         kcoreaddons
         kdnssd
         ki18n
         kio
         knotifyconfig
         kstatusnotifieritem
         kwidgetsaddons
         kwallet
         kxmlgui
         qt6-base)
makedepends=(extra-cmake-modules
             freerdp2
             kdoctools
             libvncserver
             git)
optdepends=('libvncserver: VNC support'
            'libssh: VNC support'
            'freerdp2: RDP support'
            'keditbookmarks: to edit bookmarks')
groups=(kde-applications
        kde-network)
source=(git+https://invent.kde.org/network/krdc)
sha256sums=('SKIP')
provides=(${_pkgname})
conflicts=(${_pkgname})

pkgver() {
  cd $_pkgname
  major=$(grep -m1 "VERSION_MAJOR" CMakeLists.txt | cut -d'"' -f2)
  minor=$(grep -m1 "VERSION_MINOR" CMakeLists.txt | cut -d'"' -f2)
  micro=$(grep -m1 "VERSION_MICRO" CMakeLists.txt | cut -d'"' -f2)
  blame=$(git blame CMakeLists.txt | grep -m1 "VERSION_MINOR" | cut -d' ' -f1)
  printf "%s.%s.%s.r%s.g%s" $major $minor $micro $(git rev-list --count $blame..HEAD) "$(git rev-parse --short=7 HEAD)"
}

build() {
  cmake -B build -S $_pkgname \
    -DBUILD_TESTING=OFF
  cmake --build build
}

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