summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4398d2d5eaa74c6733e10ac99a7ac16e37858873 (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
# Maintainer: Jiachen Yang <farseerfc@archlinux.org>
# Co-Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: poplarch <poplarch@gmail.com>

_pkgname=kcm-fcitx5
pkgbase=$_pkgname-git
pkgname=(kcm-fcitx5-git fcitx5-config-qt-git kbd-layout-viewer5-git)
pkgver=r292.765b011
pkgrel=1
pkgdesc="KDE Config Module for Fcitx5"
arch=('i686' 'x86_64')
url="https://github.com/fcitx/kcm-fcitx5"
license=('GPL')
depends=('fcitx5-qt5-git' 'kconfigwidgets' 'kitemviews' 'kirigami2' 'kpackage')
makedepends=('extra-cmake-modules' 'python' 'git' 'kcmutils')
conflicts=("$_pkgname")
provides=("$_pkgname")
source=("git+$url.git")
sha512sums=('SKIP')

pkgver() {
  cd $_pkgname
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}



prepare() {
  mkdir build
}

build() {
  cd build

  cmake ../$_pkgname \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
  make
}

package_kcm-fcitx5-git() {
  conflicts=("$_pkgname")
  provides=("$_pkgname")

  cd build
  make DESTDIR="$pkgdir" install
  mv "$pkgdir/usr/bin/fcitx5-config-qt" .
  mv "$pkgdir/usr/bin/kbd-layout-viewer5" .
  mv "$pkgdir/usr/share/applications/kbd-layout-viewer5.desktop" .
}

package_fcitx5-config-qt-git(){
  pkgdesc="Qt5 Config Module for Fcitx5"
  depends=('fcitx5-qt5-git' 'kitemviews' 'kwidgetsaddons')
  conflicts=("fcitx5-config-qt")
  provides=("fcitx5-config-qt")

  cd build
  install -Dm755 "fcitx5-config-qt" "$pkgdir/usr/bin/fcitx5-config-qt"
}

package_kbd-layout-viewer5-git(){
  pkgdesc="Keyboard layout viewer from Fcitx5"
  depends=('fcitx5-qt5-git')
  conflicts=("kbd-layout-viewer5")
  provides=("kbd-layout-viewer5")

  cd build
  install -Dm755 "kbd-layout-viewer5" "$pkgdir/usr/bin/kbd-layout-viewer5"
  install -Dm644 "kbd-layout-viewer5.desktop" "$pkgdir/usr/share/applications/kbd-layout-viewer5.desktop"
}