Skip to content

Commit

Permalink
rime-lmdg: fix lts version
Browse files Browse the repository at this point in the history
  • Loading branch information
everyx committed Dec 30, 2024
1 parent 114af5e commit f1d2b21
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 28 deletions.
37 changes: 17 additions & 20 deletions archlinuxcn/rime-lmdg/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
# Maintainer: ZeekoZhu <[email protected]>

pkgbase=rime-lmdg
pkgname=("${pkgbase}-config")
pkgver=3n2
pkgname=("${pkgbase}"
"${pkgbase}-config")
_release_tag=LTS
pkgver=lts
pkgrel=1
pkgdesc='RIME-LMDG万象语言模型,基于32GB超大规模语料的RIME中文语言模型'
epoch=1
pkgdesc='万象语言模型,基于32GB超大规模语料的RIME中文语言模型'
arch=(any)
url="https://github.com/amzxyz/RIME-LMDG"
source=("lmdg.yaml")
source=("lmdg.yaml"
"wanxiang-zh-hans.gram::${url}/releases/download/${_release_tag}/wanxiang-lts-zh-hans.gram")
license=('CC-BY-4.0')
sha256sums=('3248db66344b91bc175da4306cb27926abff4aad74b59a8ea20ad85ed6676e10'
'f50506698265ea5fab415752dbab5d3f0f87815f9d7860a8f044a926348a845f')
optdepends=('librime: Rime Input Method Engine')
sha256sums=('93b605fd11281ae248eed0648629ee23312fc56edd0911aa855bdee7b0c294c4'
'b8a755d7fdc568a275d2457019cc56086d69138e9f415352976664a8bc835b55')

_variants=(m1)
for _variant in "${_variants[@]}"; do
pkgname+=("${pkgbase}-${_variant}")

source+=("https://github.com/amzxyz/RIME-LMDG/releases/download/v${pkgver}/amz-v${pkgver}${_variant}-zh-hans.gram")

eval 'package_rime-lmdg-'"${_variant}"'() {
provides=("'${pkgbase}=${pkgver}'")
pkgdesc="RIME-LMDG万象语言模型(3-gram/'"${_variants#m}"'00M)"
optdepends+=("'${pkgbase}'-config: default patch configurations")
install -Dm664 "${srcdir}"/*'"${_variant}"'-zh-hans.gram -t "${pkgdir}"/usr/share/rime-data/
}'
done
package_rime-lmdg() {
provides=("${pkgbase}=${pkgver}")
replaces=('rime-lmdg-m1')
optdepends=('librime: Rime Input Method Engine'
"${pkgbase}-config: default patch configurations")
install -Dm664 "${srcdir}"/wanxiang-zh-hans.gram -t "${pkgdir}"/usr/share/rime-data/
}

package_rime-lmdg-config() {
depends=("${pkgbase}")
Expand Down
11 changes: 11 additions & 0 deletions archlinuxcn/rime-lmdg/lilac.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/python3
def pre_build():
_release_tag = _G.newver

for line in edit_file("PKGBUILD"):
if line.startswith("_release_tag="):
line = f"_release_tag={_release_tag}"
print(line)

pkgver = _release_tag.lstrip("v").replace("-", "_").lower()
update_pkgver_and_pkgrel(pkgver)
4 changes: 0 additions & 4 deletions archlinuxcn/rime-lmdg/lilac.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
maintainers:
- github: everyx

pre_build_script: |
update_pkgver_and_pkgrel(_G.newver)
post_build_script: |
git_pkgbuild_commit()
update_on:
- source: github
github: amzxyz/RIME-LMDG
use_latest_release: true
prefix: v
4 changes: 2 additions & 2 deletions archlinuxcn/rime-lmdg/lmdg.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
n3m1-zh-hans:
zh-hans:
grammar:
collocation_max_length: 5
collocation_min_length: 2
language: amz-v2n3m1-zh-hans
language: wanxiang-zh-hans
translator/contextual_suggestions: true
translator/max_homophones: 7
translator/max_homographs: 7
2 changes: 0 additions & 2 deletions archlinuxcn/rime-lmdg/package.list

This file was deleted.

0 comments on commit f1d2b21

Please sign in to comment.