aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-sphinx/APKBUILD
blob: f677c62d5f5514cbe22c64d22cb563a38f9ba288 (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
64
65
66
67
68
69
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer:  Matt Smith <mcs@darkregion.net>
pkgname=py-sphinx
_pkgname=Sphinx
pkgver=1.1.3
pkgrel=1
pkgdesc="Python Documentation Generator"
url="http://sphinx.pocoo.org/"
arch="noarch"
license="BSD"
depends="py-docutils py-jinja2 py-pygments"
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 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="8f55a6d4f87fc6d528120c5d1f983e98  Sphinx-1.1.3.tar.gz
db67051a9c85f9d35f96bcc722f83141  Sphinx-1.1.3-fix_quoting_in_inheritance.patch
6864c4cb0c0ec40dd78d4c66abfa999a  sphinx-docutils-0.10.patch"
sha256sums="34dc95b70a2b07a61b5d61034c34b05f82514aab54ad27adedb49cee911bb8e9  Sphinx-1.1.3.tar.gz
64cb12e09e6c5719cf313b49a69496c14030d9e3d861249ac24ed4b7a6d5f6bb  Sphinx-1.1.3-fix_quoting_in_inheritance.patch
f4c9d1876bc955504de12ca4f34181f187d49c1b1ac7639813cf88e1b149abde  sphinx-docutils-0.10.patch"
sha512sums="b8312140d752bf557c8e41728513812aff3e5d0a89af88dea9da0df21bf09c8315f13305d7a724a5596d0192b167d613065ea564c6d92e4ffb23f1f246dbf052  Sphinx-1.1.3.tar.gz
b8d7eef6441d0e0d80c112b1c91b0e6b3cc738a27e81177f8ae735cc2f37ee3c0f1e95e6cc9f882e4a6503bfda0c49c8e4f6429867f1de400714529339aa019b  Sphinx-1.1.3-fix_quoting_in_inheritance.patch
88d09b8143639f7d110ab2b8d4e3f377ba2f12136bb207ecc36ad021563bd12d9120027c08c477cb9730ffd8cfa5fe1d9cbb41a97c89121d4d78b19c87c7314a  sphinx-docutils-0.10.patch"