summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f423e937d098a51e9875684fa060db3333234d15 (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
# Maintainer: fortime <palfortime@gmail.com>

_pkgbase=fcitx5-osk
pkgbase=fcitx5-osk-git
pkgname=(
    fcitx5-osk-git
    fcitx5-osk-kwin-launcher-git
)
_pkgver=0.1.0
pkgver=0.1.0.r38.g39580a6
pkgrel=1
pkgdesc='An onscreen keyboard working with fcitx5'
url='https://github.com/fortime/fcitx5-osk'
source=("git+https://github.com/fortime/fcitx5-osk")
arch=('x86_64')
license=('MIT')
makedepends=('cargo' 'git' 'cmake')
depends=('fcitx5' 'ttf-font-nerd')
sha256sums=(SKIP)

pkgver() {
  cd "$srcdir/$_pkgbase"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "$_pkgbase"
  # We use a patched iced_layershell, so we can't use --offline
  #cargo fetch --offline --target "$(rustc -vV | sed -n 's|host: ||p')"
  cargo fetch --target "$(rustc -vV | sed -n 's|host: ||p')"
}

build () {
  cmake \
      -D CMAKE_INSTALL_PREFIX=/usr \
      -D DBUS_CONFIG_PARENT_DIR=/usr/share \
      -B "${srcdir}/build-${_pkgver}" \
      -S "$srcdir/$_pkgbase"
  cmake --build "${srcdir}/build-${_pkgver}"
}

package_fcitx5-osk-git() {
  DESTDIR="$pkgdir" cmake --install "${srcdir}/build-${_pkgver}" --component Fcitx5Osk
}

package_fcitx5-osk-kwin-launcher-git() {
  DESTDIR="$pkgdir" cmake --install "${srcdir}/build-${_pkgver}" --component Fcitx5OskKwinLauncher
}