diff options
author | dai9ah <dai9ah@protonmail.com> | 2018-02-21 16:16:23 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-03-05 23:21:40 +0000 |
commit | af6dff9d2cb4e7cc18c235432c356e05454d7201 (patch) | |
tree | 0de7e518f6493d88a0abc5ff8fd489e58f70f258 /community/py-jellyfish | |
parent | 66eefc32e96002c49637bb8db4e4f91dc4d23dad (diff) | |
download | aports-af6dff9d2cb4e7cc18c235432c356e05454d7201.tar.bz2 aports-af6dff9d2cb4e7cc18c235432c356e05454d7201.tar.xz |
community/py-jellyfish: add python3, fix license
Diffstat (limited to 'community/py-jellyfish')
-rw-r--r-- | community/py-jellyfish/APKBUILD | 57 |
1 files changed, 31 insertions, 26 deletions
diff --git a/community/py-jellyfish/APKBUILD b/community/py-jellyfish/APKBUILD index c87cc59d2a..5a615cd75a 100644 --- a/community/py-jellyfish/APKBUILD +++ b/community/py-jellyfish/APKBUILD @@ -1,40 +1,45 @@ # Contributor: Carlo Landmeter <clandmeter@gmail.com> # Maintainer: Carlo Landmeter <clandmeter@gmail.com> pkgname=py-jellyfish +_pkgname=${pkgname#py-} pkgver=0.5.6 -pkgrel=0 -pkgdesc="a python library for doing approximate and phonetic matching of strings" +pkgrel=1 +pkgdesc="Python library for approximate and phonetic string matching" url="https://github.com/jamesturk/jellyfish" arch="noarch" -license="BSD" -depends="" -depends_dev="" -makedepends="$depends_dev python2-dev py-setuptools" -install="" -subpackages="" -source="jellyfish-$pkgver.tar.gz::https://github.com/jamesturk/jellyfish/archive/$pkgver.tar.gz" - -_builddir="$srcdir"/jellyfish-$pkgver -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +license="BSD-2-Clause" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +source="$_pkgname-$pkgver.tar.gz::https://github.com/jamesturk/$_pkgname/archive/$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" build() { - cd "$_builddir" - python2 setup.py build || return 1 + cd "$builddir" + python2 setup.py build + python3 setup.py build } package() { - cd "$_builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname" + _py python2 +} + +_py3() { + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" } -md5sums="dc73e534a0f85296eb300d591d873238 jellyfish-0.5.6.tar.gz" -sha256sums="2e31dddf863a360966fd997ebd60c692ad56cbdbb0a352956c0aeae6af1b07b5 jellyfish-0.5.6.tar.gz" sha512sums="f8be8a9ff291a2af08632d763ee14de7b87d1dd56b5c7241826f651425bedd076913b335df452659653477682b5c683baa3f716120d0b6af4664454cc045d9ca jellyfish-0.5.6.tar.gz" |