diff --git a/community/opencc/PKGBUILD b/community/opencc/PKGBUILD index e462cc37f..bdfc1fb46 100644 --- a/community/opencc/PKGBUILD +++ b/community/opencc/PKGBUILD @@ -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"