summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7e7658e6a26f332b75a9589686760a5468a7ad76 (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
# Maintainer: KokaKiwi <kokakiwi+aur@kokakiwi.net>

pkgname=plasma5-applets-uswitch-git
pkgver=1.3.0.r2.g4c9936a
pkgrel=2
pkgdesc='Modified version of User Switch plasmoid'
url='https://gitlab.com/divinae/uswitch'
license=('GPL3')
arch=('any')
depends=('plasma-workspace')
makedepends=('git' 'cmake' 'extra-cmake-modules' 'kcoreaddons5')
provides=('plasma5-applets-uswitch')
conflicts=('plasma5-applets-uswitch')
source=("$pkgname::git+https://gitlab.com/divinae/uswitch.git")
sha256sums=('SKIP')
b2sums=('SKIP')

pkgver() {
  cd "$pkgname"

  git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "$pkgname"

  cd package
  desktoptojson -i metadata.desktop

  mkdir -p plasmoid
  mv -t plasmoid metadata.json contents
}

build() {
  cd "$pkgname"

  cmake -S package -B build \
    -W no-dev \
    -D CMAKE_INSTALL_PREFIX=/usr \
    -D CMAKE_BUILD_TYPE=RelWithDeb \
    -D KDE_INSTALL_LIBDIR=lib \
    -D KDE_INSTALL_USE_QT_SYS_PATHS=ON

  cmake --build build
}

package() {
  cd "$pkgname"

  cmake --install build --prefix "${pkgdir}/usr"

  install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}