[arch-commits] Commit in opencc/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Tue Nov 10 05:07:08 UTC 2020
Date: Tuesday, November 10, 2020 @ 05:07:07
Author: felixonmars
Revision: 749302
archrelease: copy trunk to community-staging-x86_64
Added:
opencc/repos/community-staging-x86_64/
opencc/repos/community-staging-x86_64/PKGBUILD
(from rev 749301, opencc/trunk/PKGBUILD)
----------+
PKGBUILD | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
Copied: opencc/repos/community-staging-x86_64/PKGBUILD (from rev 749301, opencc/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2020-11-10 05:07:07 UTC (rev 749302)
@@ -0,0 +1,54 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=opencc
+pkgname=(opencc opencc-doc)
+pkgver=1.1.1
+pkgrel=4
+url="https://github.com/BYVoid/OpenCC"
+arch=('x86_64')
+license=('Apache')
+makedepends=('cmake' 'doxygen' 'python-setuptools' 'python-wheel')
+source=("https://github.com/BYVoid/OpenCC/archive/ver.$pkgver/$pkgbase-$pkgver.tar.gz"
+ opencc-fix-missing-include.patch::https://github.com/BYVoid/OpenCC/pull/417.patch)
+sha512sums=('48ccf61f63cf0a1c0fc484a52ae1d406a28949a52be7d7d1595e6aaf87f40ac47ea4697308441a9381f0cd6f404ee5a28b85a2fa2f288c4b3933be36f4a41363'
+ '1c04eee731391c523ca8950f8520bb713a7e7f1fa9fd1c38e44dc193e5f026fc3fa120120eba9ecaa6108e12d22c56f50d5e92c05ac38d5afa624fc6cc9e8c7d')
+
+prepare() {
+ patch -d OpenCC-ver.$pkgver -p1 < opencc-fix-missing-include.patch
+ cd OpenCC-ver.$pkgver/python
+ # Use system opencc
+ sed -i '/BuildPyCommand,/d' setup.py
+ sed -e "s|os.path.join(_thisdir, 'clib', 'lib', _libopenccfilename)|os.path.join('/usr/lib', _libopenccfilename)|" \
+ -e "s|os.path.join(_thisdir, 'clib', 'share', 'opencc')|'/usr/share/opencc'|" \
+ -i opencc/__init__.py
+}
+
+build() {
+ cd OpenCC-ver.$pkgver
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_DOCUMENTATION:BOOL=ON
+ make
+
+ cd python
+ python setup.py build
+}
+
+package_opencc() {
+ pkgdesc="Library for Open Chinese Convert"
+ depends=('gcc-libs')
+
+ cd OpenCC-ver.$pkgver
+ make DESTDIR="${pkgdir}" install
+
+ cd python
+ python setup.py install --root="$pkgdir" --optimize=1
+
+ # Remove docs - install in splitted package
+ rm -r "$pkgdir/usr/share/opencc/doc"
+}
+
+package_opencc-doc() {
+ pkgdesc="Documentation for Library for Open Chinese Convert"
+
+ cd OpenCC-ver.$pkgver/doc
+ make DESTDIR="${pkgdir}" install
+}
More information about the arch-commits
mailing list