diff options
author | Kisaragi Hiu | 2024-04-05 02:33:44 +0900 |
---|---|---|
committer | Kisaragi Hiu | 2024-04-05 02:33:44 +0900 |
commit | db93415a25f552f2f3c2ce2303426229177ae5ec (patch) | |
tree | 9b15fec711159fe432e232dba3b328a9292d9688 | |
download | aur-db93415a25f552f2f3c2ce2303426229177ae5ec.tar.gz |
Initial commit
Adopted from https://aur.archlinux.org/packages/rime-pinyin-zhwiktionary,
but prepared to use my fork in order to include tones and use
Traditional Chinese characters.
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 55 |
2 files changed, 59 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..f71c635dafda --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +* +!.gitignore +!PKGBUILD +!.SRCINFO diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..aaac4e44f5e1 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,55 @@ +# Contributor: Felix Yan <felixonmars@archlinux.org> +# Contributor: Kasei Wang <kasei@kasei.im> +# Maintainer: Kisaragi Hiu <mail@kisaragi-hiu.com> + +pkgbase=rime-pinyin-zhwiktionary-hant +_converter=rime-pinyin-zhwiktionary-hant-converter +pkgname=(rime-pinyin-zhwiktionary-hant fcitx5-pinyin-zhwiktionary-hant) +_zhwiktionaryver=latest +pkgver=0.20240401 +pkgrel=1 +pkgdesc="Rime Pinyin (+ tones) Dictionary for zh.wiktionary.org (Traditional Chinese)" +arch=('any') +url="https://github.com/kisaragi-hiu/rime-pinyin-zhwiktionary-hant" +license=('CCPL:by-sa' 'custom:GFDL') +makedepends=('libime' 'opencc' 'pypinyin') +source=(git+https://github.com/kisaragi-hiu/rime-pinyin-zhwiktionary-hant-converter + https://dumps.wikimedia.org/zhwiktionary/$_zhwiktionaryver/zhwiktionary-$_zhwiktionaryver-all-titles-in-ns0.gz + https://dumps.wikimedia.org/zhwiktionary/$_zhwiktionaryver/zhwiktionary-$_zhwiktionaryver-md5sums.txt + https://www.gnu.org/licenses/fdl-1.3.txt) +sha512sums=('SKIP' + 'SKIP' + 'SKIP' + '22d46818d3998ad841f537af4de7c50440dd918099fb6c5d4ab324cd71dc03066bfe1b67210a5efde77abd1d97b88da3c3dbfc39a24ae7248ee2d64e7f0fe6bb') + +_make="make -L VERSION=$_zhwiktionaryver" + +pkgver() { + if [[ $(head -1 zhwiktionary-$_zhwiktionaryver-md5sums.txt) =~ [[:digit:]]{8} ]]; then + echo 0.${BASH_REMATCH[0]} + fi +} + +prepare() { + cd $_converter + # Workaround pacman decompression + touch zhwiktionary-$_zhwiktionaryver-all-titles-in-ns0.gz + ln -sf ../zhwiktionary-$_zhwiktionaryver-all-titles-in-ns0 +} + +build() { + cd $_converter + $_make zhwiktionary.dict zhwiktionary.dict.yaml +} + +package_fcitx5-pinyin-zhwiktionary-hant() { + cd $_converter + $_make DESTDIR="$pkgdir" install + install -Dm644 ../fdl-1.3.txt -t "$pkgdir"/usr/share/licenses/$pkgname/ +} + +package_rime-pinyin-zhwiktionary-hant() { + cd $_converter + $_make DESTDIR="$pkgdir" install_rime_dict + install -Dm644 ../fdl-1.3.txt -t "$pkgdir"/usr/share/licenses/$pkgname/ +} |