From a328d61d13f7d3fcdbdda15813ed0c793325fa45 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Sat, 20 Apr 2019 12:07:38 -0400 Subject: [PATCH] Import py-pyphen from testing --- sr.ht/py-pyphen/APKBUILD | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 sr.ht/py-pyphen/APKBUILD diff --git a/sr.ht/py-pyphen/APKBUILD b/sr.ht/py-pyphen/APKBUILD new file mode 100644 index 0000000..27c5574 --- /dev/null +++ b/sr.ht/py-pyphen/APKBUILD @@ -0,0 +1,51 @@ +# Contributor: Stefan Wagner +# Maintainer: Drew DeVault +pkgname=py-pyphen +_pkgname=Pyphen +pkgver=0.9.5 +pkgrel=1 +pkgdesc="python-based dictionary hyphenator library" +url="http://www.pyphen.org/" +arch="noarch" +license="GPL-2.0-or-later MPL LGPL-2.0-or-later" +makedepends="python2-dev python3-dev py2-setuptools py3-setuptools" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + cd "$builddir" + python2 setup.py build + python3 setup.py build +} + +check() { + cd "$builddir" + python2 setup.py test + python3 setup.py test +} + +package() { + 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" +} + +sha512sums="15b9a29517df2b873b5b8d4739d8fa48a09ab199ab9246c7a4fd25c46253a74a18a88fd9484978476b3b1c8d88fed7729382b9dbe4f425724fe54bcd6227de96 Pyphen-0.9.5.tar.gz" -- 2.45.2