aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-sphinx_rtd_theme
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2016-11-07 21:19:40 +0000
committerJakub Jirutka <jakub@jirutka.cz>2016-11-08 22:58:24 +0100
commit1a4c4b09e7b43356a65d11a236532448c306ddc9 (patch)
tree40632e582b1c5d35bab464228ca8bb51abd4af11 /main/py-sphinx_rtd_theme
parent3bbf3f06ed225e1d5286714de8bd4de2091ee26f (diff)
downloadaports-1a4c4b09e7b43356a65d11a236532448c306ddc9.tar.bz2
aports-1a4c4b09e7b43356a65d11a236532448c306ddc9.tar.xz
main/py-sphinx_rtd_theme: add py2/py3 subpackages
Diffstat (limited to 'main/py-sphinx_rtd_theme')
-rw-r--r--main/py-sphinx_rtd_theme/APKBUILD50
1 files changed, 29 insertions, 21 deletions
diff --git a/main/py-sphinx_rtd_theme/APKBUILD b/main/py-sphinx_rtd_theme/APKBUILD
index a0e8e7e217..dfe246763e 100644
--- a/main/py-sphinx_rtd_theme/APKBUILD
+++ b/main/py-sphinx_rtd_theme/APKBUILD
@@ -1,38 +1,46 @@
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
-# Maintainer:
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-sphinx_rtd_theme
+_pkgname=sphinx_rtd_theme
pkgver=0.1.9
-pkgrel=0
+pkgrel=1
pkgdesc="Sphinx theme for readthedocs.org"
url="https://github.com/snide/sphinx_rtd_theme"
arch="noarch"
license="MIT"
depends=""
-depends_dev=""
-makedepends="$depends_dev python2-dev py-setuptools"
-install=""
-subpackages=""
-source="sphinx_rtd_theme-$pkgver.tar.gz::https://github.com/snide/sphinx_rtd_theme/archive/$pkgver.tar.gz"
-
-_builddir="$srcdir"/sphinx_rtd_theme-$pkgver
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="$_pkgname-$pkgver.tar.gz::https://github.com/snide/$_pkgname/archive/$pkgver.tar.gz"
+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 --prefix=/usr --root="$pkgdir" || return 1
+ 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"
}
md5sums="f1745463231113bb2677ad34f0a20b3a sphinx_rtd_theme-0.1.9.tar.gz"