diff options
author | Orson Teodoro <orsonteodoro@hotmail.com> | 2018-02-26 20:58:09 -0800 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2018-02-27 21:51:00 +0000 |
commit | be409dcb9b03d61234bf59a9e264a622b376b5ef (patch) | |
tree | 00e69852ab93e5cb18eaa0d4e220483564c8dd35 | |
parent | f68c680eecf5496b795007438fe641520120219c (diff) | |
download | aports-be409dcb9b03d61234bf59a9e264a622b376b5ef.tar.bz2 aports-be409dcb9b03d61234bf59a9e264a622b376b5ef.tar.xz |
testing/py-pypeg2: new package
Fix indent and download
-rw-r--r-- | testing/py-pypeg2/APKBUILD | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/testing/py-pypeg2/APKBUILD b/testing/py-pypeg2/APKBUILD new file mode 100644 index 0000000000..9d9f4ba99c --- /dev/null +++ b/testing/py-pypeg2/APKBUILD @@ -0,0 +1,53 @@ +# Contributor: Orson Teodoro <orsonteodoro@hotmail.com> +# Maintainer: Orson Teodoro <orsonteodoro@hotmail.com> +pkgname=py-pypeg2 +_pkgname=pypeg2 +__pkgname=pypeg +pkgver=2.15.2 +pkgrel=0 +pkgdesc="An intrinsic PEG Parser-Interpreter for Python" +url="https://fdik.org/pyPEG2/" +arch="noarch" +license="GPL-2.0-only" +_gitrev="43b84d987ec1" +depends="py-lxml" +makedepends="py-setuptools py3-setuptools" +subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_py3 $pkgname-doc" +source="$pkgname-$pkgver.tar.gz::https://bitbucket.org/fdik/$__pkgname/get/$pkgver.tar.gz" +builddir="$srcdir"/fdik-$__pkgname-$_gitrev + +check() { + cd "$builddir" + python2 setup.py check + python3 setup.py check + sed -i -e "s|PYTHON=python3.3||g" Makefile + PYTHON="/usr/bin/python2" make test + PYTHON="/usr/bin/python3" make test +} + +_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" +} + +_py2() { + depends="${depends//py-//py2-}" + _py python2 +} + +_py3() { + depends="${depends//py-//py3-}" + _py python3 +} + +package() { + cd "$builddir" + install -d "$pkgdir"/usr/share/doc/$pkgname + install -t "$pkgdir"/usr/share/doc/$pkgname CHANGES.txt README.txt +} + +sha512sums="425e9f56c2353687ab0a77789c209359fd0cf50a949f39fea88c2e153737fbd4e7b0c9716895606a912fa4b98ced3380361739ebddeb13f60c6aad9e41a018d7 py-pypeg2-2.15.2.tar.gz" |