summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 04d2be649d07a7f2af37bd1b013e21618c1b0c94 (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
# Contributor: Myt1 <MYT1 @ QQ.com>

pkgname=fcitx5-pinyin-sougou-dict-git
_pkgname=sougouscel
pkgver=20241130.r0.g110582a
pkgrel=1
pkgdesc="Fcitx5-pinyin搜狗官网词库全部词量"
arch=('any')
url="https://pinyin.sogou.com/dict/"
license=('custom')
makedepends=('libime' 'git')
source=(git+https://github.com/maoyaotang12/sougouscel.git)
sha512sums=('SKIP')

pkgver() {
    cd ${_pkgname}
    git describe --long --tags --abbrev=7 | sed 's/^v//;s/-/.r/;s/-/./'
}

prepare(){
    cd ${_pkgname}/scel
    chmod +x txt.sh
    ./txt.sh
    rm -r txt.sh
}

build() {
	cp -r "${srcdir}/${_pkgname}/百度个人词库.txt" "${srcdir}/${_pkgname}/scel/百度个人词库.txt"
	cat ${_pkgname}/scel/*.txt > sougouciku.txt
	libime_pinyindict sougouciku.txt sougouciku.dict
}

package() {
	install -Dm644 sougouciku.dict -t $pkgdir/usr/share/fcitx5/pinyin/dictionaries/
}