summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7f1c069a76afb8acaeaaa3755508873c8b70bfa2 (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
pkgname=wlime-git
_pkgname=wlime
pkgver=r3.ce3544d
pkgrel=1
pkgdesc='fullscreen arcade-style cjk input method for hyprland'
arch=('x86_64')
url='https://github.com/eam/wlime'
license=('GPL-3.0-or-later')
depends=(
  'gtk3'
  'gtk-layer-shell'
  'libpinyin'
  'wayland'
  'libxkbcommon'
  'cairo'
)
makedepends=(
  'git'
  'meson'
  'ninja'
  'wayland-protocols'
  'wlr-protocols'
)
optdepends=(
  'pipewire: sound effects via pw-play'
  'ffmpeg: generate sound effects on first run'
  'libhangul: korean input engine support'
  'anthy: japanese input engine support'
  'librime: rime input engine support'
)
provides=('wlime')
conflicts=('wlime')
source=("git+${url}.git")
sha256sums=('SKIP')

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

build() {
  local meson_options=(
    --prefix=/usr
    --buildtype=release
  )

  arch-meson "$srcdir/$_pkgname" build "${meson_options[@]}"
  meson compile -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build

  install -Dm644 "$srcdir/$_pkgname/README.md" \
    "$pkgdir/usr/share/doc/$pkgname/README.md"

  install -Dm644 "$srcdir/$_pkgname/config.example" \
    "$pkgdir/usr/share/doc/$pkgname/config.example"
}