aboutsummaryrefslogblamecommitdiffstats
path: root/main/py-sphinx/APKBUILD
blob: d3aa6880577e19a86c21841c5594388ca5197aa2 (plain) (tree)
1
2
3
4
5
6
7
8
9



                                              

            

                                        
             
             
                                           
                                      
          



                                                                                                  











                                         
                                                                          




                       



                                                                           





                                                                               


                                                                          

                          

                                                           

 
                                                               
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer:  Matt Smith <mcs@darkregion.net>
pkgname=py-sphinx
_pkgname=Sphinx
pkgver=1.1.3
pkgrel=0
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"

_builddir="$srcdir"/$_pkgname-$pkgver
prepare() {
	cd "$_builddir"
	# apply patches here
}

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"