[arch-commits] Commit in marisa/trunk (PKGBUILD)
Felix Yan
felixonmars at archlinux.org
Thu Jan 2 14:54:10 UTC 2020
Date: Thursday, January 2, 2020 @ 14:54:09
Author: felixonmars
Revision: 546180
upgpkg: marisa 0.2.5-7
build binding for python3 instead
Modified:
marisa/trunk/PKGBUILD
----------+
PKGBUILD | 28 +++++++++++++++++++++++++---
1 file changed, 25 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-01-02 14:50:29 UTC (rev 546179)
+++ PKGBUILD 2020-01-02 14:54:09 UTC (rev 546180)
@@ -2,14 +2,14 @@
# Contributor: ponsfoot <cabezon dot hashimoto at gmail dot com>
pkgbase=marisa
-pkgname=('marisa' 'perl-marisa' 'ruby-marisa')
+pkgname=('marisa' 'perl-marisa' 'python-marisa' 'ruby-marisa')
pkgver=0.2.5
pkgrel=7
arch=('x86_64')
url="https://github.com/s-yata/marisa-trie"
license=('BSD' 'LGPL')
-makedepends=('ruby' 'perl')
-source=("marisa-trie-$pkgver::https://github.com/s-yata/marisa-trie/archive/v$pkgver.tar.gz")
+makedepends=('python' 'ruby' 'perl' 'swig')
+source=("marisa-trie-$pkgver.tar.gz::https://github.com/s-yata/marisa-trie/archive/v$pkgver.tar.gz")
sha512sums=('62975a2dacd2a1072c990cd490f866cd5483c069c94a4706baf3ffc21ec43991583a8ef8721c3b841617b0654cbb894698c19759ff12b8887b6fd28939dfb547')
prepare() {
@@ -31,6 +31,9 @@
make
+ # Regenerate swig bindings
+ make -C bindings -j1
+
# Perl bindings
cd "$srcdir"/marisa-trie-$pkgver/bindings/perl
perl Makefile.PL \
@@ -38,6 +41,13 @@
LIBS=-L"$srcdir"/marisa-trie-$pkgver/lib/marisa/.libs
make
+ # Python bindings
+ cd "$srcdir"/marisa-trie-$pkgver/bindings/python
+ python setup.py build_ext \
+ --include-dirs="$srcdir"/marisa-trie-$pkgver/include \
+ --library-dirs="$srcdir"/marisa-trie-$pkgver/lib/marisa/.libs
+ python setup.py build
+
# Ruby bindings
cd "$srcdir"/marisa-trie-$pkgver/bindings/ruby
ruby extconf.rb \
@@ -73,6 +83,18 @@
install -m 644 AUTHORS COPYING.md "$pkgdir"/usr/share/licenses/$pkgname/
}
+package_python-marisa() {
+ pkgdesc="Python language binding for marisa"
+ depends=('python' 'marisa')
+
+ cd marisa-trie-$pkgver/bindings/python
+ python setup.py install -O1 --root="$pkgdir"
+
+ cd ../..
+ install -d "$pkgdir"/usr/share/licenses/$pkgname
+ install -m 644 AUTHORS COPYING.md "$pkgdir"/usr/share/licenses/$pkgname/
+}
+
package_ruby-marisa() {
pkgdesc="Ruby language binding for marisa"
depends=('ruby' 'marisa')
More information about the arch-commits
mailing list