A sr.ht/py-pyphen/APKBUILD => sr.ht/py-pyphen/APKBUILD +51 -0
@@ 0,0 1,51 @@
+# Contributor: Stefan Wagner <stw@bit-strickerei.de>
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+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"