aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-sphinx/APKBUILD
blob: 86f1dfa3c20264b542228f886f662d9cce805a80 (plain)
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
53
54
55
56
57
58
59
60
61
62
63
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer: Matt Smith <mcs@darkregion.net>
pkgname=py-sphinx
_pkgname=Sphinx
pkgver=1.2.2
pkgrel=0
pkgdesc="Python Documentation Generator"
url="http://sphinx.pocoo.org/"
arch="noarch"
license="BSD"
depends="py-docutils py-jinja2 py-pygments py-setuptools"
makedepends="python-dev py-setuptools"
install=""
subpackages="$pkgname-doc"
source="http://pypi.python.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
#	Sphinx-1.1.3-fix_quoting_in_inheritance.patch
#	sphinx-docutils-0.10.patch"

_builddir="$srcdir"/$_pkgname-$pkgver
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	python setup.py build || return 1
}

package() {
	cd "$_builddir"
	python setup.py install --prefix=/usr --root="$pkgdir" || return 1
}

doc() {
	cd "$_builddir"

	mkdir -p "$subpkgdir"/usr/share/doc/$pkgname || return 1
	for _doc in AUTHORS CHANGES EXAMPLES LICENSE README.rst TODO; do
		install -Dm644 $_doc "$subpkgdir"/usr/share/doc/$pkgname/ \
			|| return 1
	done

	# Note: Documentation in the 'doc' directory (below), needs to be built
	# with sphinx-build once sphinx is installed (see README for details).
	#
	# Leaving as-is; will be up to the individual user that's interested.
	mkdir -p "$subpkgdir"/usr/share/doc/$pkgname/doc/ || return 1
	cp -R ./doc/* "$subpkgdir"/usr/share/doc/$pkgname/doc/ || return 1
	chmod -R 644 "$subpkgdir"/usr/share/doc/$pkgname/doc/ || return 1

	# Fix subdir perms
	find "$subpkgdir"/usr/share/doc/$pkgname/ -type d \
		-exec chmod 755 '{}' \; || return 1
}

md5sums="3dc73ccaa8d0bfb2d62fb671b1f7e8a4  Sphinx-1.2.2.tar.gz"
sha256sums="2d3415f5b3e6b7535877f4c84fe228bdb802a8993c239b2d02c23169d67349bd  Sphinx-1.2.2.tar.gz"
sha512sums="44073c215f9d0e7f6c7bc91cb85b0508a96e5cfff5f940fef86e2fc6f11281d03b54e87e51e5a99a23e96b470a93f3af86a6a3ab7c317c747406c55b4c37791c  Sphinx-1.2.2.tar.gz"