aboutsummaryrefslogblamecommitdiffstats
path: root/main/py-jinja2/APKBUILD
blob: 72470ba30fa749de6f4239f268008f71a7cc28ec (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-jinja2
_pkgname=Jinja2
pkgver=2.6
pkgrel=0
pkgdesc="A small but fast and easy to use stand-alone python template engine"
url="http://jinja.pocoo.org/"
arch="noarch"
license="BSD"
depends="python"
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 --root "$pkgdir" || return 1
}

doc() {
	cd "$_builddir"

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

	# Note: The documentation in the docs directory needs to be generated
	# by py-sphinx, however, this package (py-jinja2) is a dependency of
	# Sphinx itself!
	mkdir -p "$subpkgdir"/usr/share/doc/$pkgname/docs || return 1
	cp -R ./docs/* "$subpkgdir"/usr/share/doc/$pkgname/docs/ || return 1
	chmod -R 644 "$subpkgdir"/usr/share/doc/$pkgname/docs/ || return 1

	mkdir -p "$subpkgdir"/usr/share/$pkgname || return 1
	for _dir in artwork examples ext; do
		mkdir -p "$subpkgdir"/usr/share/$pkgname/$_dir/ || return 1
		cp -R ./$_dir/* "$subpkgdir"/usr/share/$pkgname/$_dir/ \
			|| return 1
		chmod -R 644 "$subpkgdir"/usr/share/$pkgname/$_dir/ \
			|| return 1
	done

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

md5sums="1c49a8825c993bfdcf55bb36897d28a2  Jinja2-2.6.tar.gz"
sha256sums="a85e185375db75c109f99ecde3d55415f035e7068a82252cf4f16c667ac38f49  Jinja2-2.6.tar.gz"
sha512sums="6603bd6a7e4956433746da15b18b1206b67c901262337aab8352ddff154efca9eb6d652c244c63e8ffad492d204c724db3e86222ae371e75e3f5f2011244554e  Jinja2-2.6.tar.gz"