aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-sphinx_rtd_theme/APKBUILD
blob: 9ae6cda0639f0f15e148b1bc5787689a8b2014db (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-sphinx_rtd_theme
_pkgname=sphinx_rtd_theme
pkgver=0.4.0
pkgrel=0
pkgdesc="Sphinx theme for readthedocs.org"
url="https://github.com/snide/sphinx_rtd_theme"
arch="noarch"
license="MIT"
makedepends="python2-dev python3-dev py-setuptools"
checkdepends="pytest"
options="!check" # readthedocs_ext is missing
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"
	python2 setup.py build
	python3 setup.py build
}

check() {
	cd "$builddir"
	py.test
}

package() {
	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"
}

sha512sums="c54050b0e6f05d664ec1b7f65e5f4f93181f535b345ba91ff9ada73dfd1b9c4e1d549f7a159131e99332beab6914fb00f81d66a72fe69b3f1dfe78abee539ebe  sphinx_rtd_theme-0.4.0.tar.gz"