diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2016-11-07 20:41:31 +0000 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-11-19 15:36:50 +0100 |
commit | 56c95218ffa2c148187ea8df7f447b75d6e09b2f (patch) | |
tree | e721e4b3e97220fef411f47fc6fa2bbd6032d582 /main/py-docutils/APKBUILD | |
parent | d4d6c96c22e75bad84840960bbc6a37d34d35590 (diff) | |
download | aports-56c95218ffa2c148187ea8df7f447b75d6e09b2f.tar.bz2 aports-56c95218ffa2c148187ea8df7f447b75d6e09b2f.tar.xz |
main/py-docutils: add py2/py3 subpackages
Diffstat (limited to 'main/py-docutils/APKBUILD')
-rw-r--r-- | main/py-docutils/APKBUILD | 47 |
1 files changed, 31 insertions, 16 deletions
diff --git a/main/py-docutils/APKBUILD b/main/py-docutils/APKBUILD index 3f817a4977..d7dfe79a9d 100644 --- a/main/py-docutils/APKBUILD +++ b/main/py-docutils/APKBUILD @@ -1,33 +1,48 @@ # Contributor: Matt Smith <mcs@darkregion.net> -# Maintainer: Matt Smith <mcs@darkregion.net> +# Maintainer: Matt Smith <mcs@darkregion.net> pkgname=py-docutils _pkgname=docutils pkgver=0.12 -pkgrel=0 +pkgrel=1 pkgdesc="Documentation Utilities for Python" url="http://docutils.sourceforge.net/" arch="noarch" -license="PublicDomain" -depends="python2 py-pillow py-roman" -makedepends="python2-dev py-setuptools" -install= -subpackages="$pkgname-doc" +license="Public Domain" +depends="py-pillow py-roman" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3 $pkgname-doc" source="http://downloads.sourceforge.net/$_pkgname/$_pkgname-$pkgver.tar.gz" - -_builddir="$srcdir"/$_pkgname-$pkgver -prepare() { - cd "$_builddir" - # apply patches here -} +builddir="$srcdir/$_pkgname-$pkgver" build() { - cd "$_builddir" + cd "$builddir" python2 setup.py build || return 1 + python3 setup.py build || return 1 } package() { - cd "$_builddir" - python2 setup.py install --root "$pkgdir" || return 1 + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname" + depends="${depends//py-/py2-}" + _py python2 +} + +_py3() { + depends="${depends//py-/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" } doc() { |