aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-docutils/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/py-docutils/APKBUILD')
-rw-r--r--main/py-docutils/APKBUILD47
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() {