summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4694ee773081f61e41031fe31638da8bc51a25a6 (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
# Maintainer: Howard Cheung <mail@h-cheung.cf>

pkgname=rime-easy-en-git
_reponame=rime-easy-en
pkgver=20200519.r21.5848ebd
pkgrel=1
pkgdesc="Easy en for rime"
arch=('x86_64')
url="https://github.com/rime/rime-luna-pinyin"
license=('LGPL')
# dependency for reverse lookup
depends=('rime-stroke')
makedepends=('librime' 'rime-prelude' 'rime-essay')
source=("git+https://github.com/BlindingDark/rime-easy-en")
sha512sums=('SKIP')


pkgver() {
    cd $_reponame
    local date=$(git log -1 --format="%cd" --date=short | sed s/-//g)
    local count=$(git rev-list --count HEAD)
    local commit=$(git rev-parse --short HEAD)
    echo "$date.r${count}.$commit"
}

prepare() {
  cd $_reponame
  # Link essentials
  for _f in $(pacman -Qql rime-prelude rime-essay | grep -v "/$"); do ln -sf $_f; done
}

build(){
  cd $_reponame
  for _s in $(ls *.schema.yaml); do rime_deployer --compile $_s; done
}

package() {
  cd $_reponame
  find . -type l -delete
  rm build/*.txt
  install -Dm644 *.yaml -t "$pkgdir"/usr/share/rime-data/
  install -Dm644 build/* -t "$pkgdir"/usr/share/rime-data/build/
}