summaryrefslogtreecommitdiffstats
path: root/abs/core/python_modules/python-snowballstemmer/PKGBUILD
blob: 676c0e8e38aa16ebe7a4defd2612f86ede086b73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: xantares

pkgbase=python-snowballstemmer
pkgname=('python-snowballstemmer' 'python2-snowballstemmer')
pkgver=1.2.1
pkgrel=2
arch=('any')
pkgdesc="Snowball stemming library collection for Python"
url='https://github.com/shibukawa/snowball_py'
license=('BSD')
makedepends=('python' 'python2')
source=("https://pypi.python.org/packages/source/s/snowballstemmer/snowballstemmer-${pkgver}.tar.gz")
md5sums=('643b019667a708a922172e33a99bf2fa')

prepare() {
  cp -a snowballstemmer-${pkgver}{,-py2}
}

build() {
  cd "$srcdir"/snowballstemmer-${pkgver}
  python setup.py build

  cd "$srcdir"/snowballstemmer-${pkgver}-py2
  python2 setup.py build
}

package_python-snowballstemmer() {
  depends=('python')
  optdepends=('python-pystemmer: for improved performance')

  cd "$srcdir"/snowballstemmer-${pkgver}
  python setup.py install --root="$pkgdir" --optimize=1

  install -Dm644 LICENSE.rst "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.rst
}

package_python2-snowballstemmer() {
  depends=('python2')
  optdepends=('python2-pystemmer: for improved performance')

  cd "$srcdir"/snowballstemmer-${pkgver}-py2 
  python2 setup.py install --root="$pkgdir" --optimize=1

  install -Dm644 LICENSE.rst "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.rst
}