[arch-commits] Commit in opencc/repos/community-testing-x86_64 (PKGBUILD PKGBUILD)

Felix Yan felixonmars at archlinux.org
Sat May 23 07:59:33 UTC 2020


    Date: Saturday, May 23, 2020 @ 07:59:33
  Author: felixonmars
Revision: 631845

archrelease: copy trunk to community-testing-x86_64

Added:
  opencc/repos/community-testing-x86_64/PKGBUILD
    (from rev 631844, opencc/trunk/PKGBUILD)
Deleted:
  opencc/repos/community-testing-x86_64/PKGBUILD

----------+
 PKGBUILD |   87 +++++++++++++++++++++++++++++++++++--------------------------
 1 file changed, 51 insertions(+), 36 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2020-05-23 07:59:14 UTC (rev 631844)
+++ PKGBUILD	2020-05-23 07:59:33 UTC (rev 631845)
@@ -1,36 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-
-pkgbase=opencc
-pkgname=(opencc opencc-doc)
-pkgver=1.1.1
-pkgrel=1
-url="https://github.com/BYVoid/OpenCC"
-arch=('x86_64')
-license=('Apache')
-makedepends=('cmake' 'doxygen' 'python')
-source=("https://github.com/BYVoid/OpenCC/archive/ver.$pkgver/$pkgbase-$pkgver.tar.gz")
-sha512sums=('48ccf61f63cf0a1c0fc484a52ae1d406a28949a52be7d7d1595e6aaf87f40ac47ea4697308441a9381f0cd6f404ee5a28b85a2fa2f288c4b3933be36f4a41363')
-
-build() {
-  cd OpenCC-ver.$pkgver
-  cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_DOCUMENTATION:BOOL=ON
-  make
-}
-
-package_opencc() {
-  pkgdesc="Library for Open Chinese Convert"
-  depends=('gcc-libs')
-
-  cd OpenCC-ver.$pkgver
-  make DESTDIR="${pkgdir}" install
-
-  # 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
-}

Copied: opencc/repos/community-testing-x86_64/PKGBUILD (from rev 631844, opencc/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-05-23 07:59:33 UTC (rev 631845)
@@ -0,0 +1,51 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=opencc
+pkgname=(opencc opencc-doc)
+pkgver=1.1.1
+pkgrel=2
+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")
+sha512sums=('48ccf61f63cf0a1c0fc484a52ae1d406a28949a52be7d7d1595e6aaf87f40ac47ea4697308441a9381f0cd6f404ee5a28b85a2fa2f288c4b3933be36f4a41363')
+
+prepare() {
+  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