diff options
Diffstat (limited to 'main/py-sphinx_rtd_theme/APKBUILD')
-rw-r--r-- | main/py-sphinx_rtd_theme/APKBUILD | 50 |
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" |