community/opencc to 1.1.6-2

This commit is contained in:
Kevin Mihelich 2023-05-03 19:16:42 +00:00
parent e66c480855
commit 724206c798

View file

@ -6,7 +6,7 @@
pkgbase=opencc
pkgname=(opencc opencc-doc)
pkgver=1.1.6
pkgrel=1
pkgrel=2
pkgdesc="Library for Open Chinese Convert"
url="https://github.com/BYVoid/OpenCC"
arch=('x86_64')
@ -47,11 +47,12 @@ package_opencc() {
python setup.py install --root="$pkgdir" --optimize=1
# Hack to make opencc's python binding to use system opencc's configs
mkdir "$pkgdir"/usr/lib/python3.10/site-packages/opencc/clib/share
ln -s ../../../../../../share/opencc "$pkgdir"/usr/lib/python3.10/site-packages/opencc/clib/share/
local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
mkdir "$pkgdir"/usr/lib/"python$python_version"/site-packages/opencc/clib/share
ln -s ../../../../../../share/opencc "$pkgdir"/usr/lib/"python$python_version"/site-packages/opencc/clib/share/
# Remove insecure RPath
chrpath --delete "$pkgdir"/usr/lib/python3.10/site-packages/opencc/clib/*.so
chrpath --delete "$pkgdir"/usr/lib/"python$python_version"/site-packages/opencc/clib/*.so
# Remove docs - install in split package
rm -r "$pkgdir/usr/share/opencc/doc"