summaryrefslogtreecommitdiffstats
path: root/testing/py-jinja2/APKBUILD
diff options
context:
space:
mode:
authorMatt Smith <mcs@darkregion.net>2010-12-14 23:29:05 -0600
committerNatanael Copa <ncopa@alpinelinux.org>2010-12-16 10:30:51 +0000
commit5e508732ea1b23ac92b8cd3735f917b697e0f0ad (patch)
tree556a24eeb5354819f546736f2f3a946c19cf9698 /testing/py-jinja2/APKBUILD
parent3cf6576605e60c17e0a03ac031d89ca2115922ee (diff)
testing/py-jinja2: new aport
Diffstat (limited to 'testing/py-jinja2/APKBUILD')
-rw-r--r--testing/py-jinja2/APKBUILD61
1 files changed, 61 insertions, 0 deletions
diff --git a/testing/py-jinja2/APKBUILD b/testing/py-jinja2/APKBUILD
new file mode 100644
index 00000000000..31aa7dcf03d
--- /dev/null
+++ b/testing/py-jinja2/APKBUILD
@@ -0,0 +1,61 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=py-jinja2
+_pkgname=Jinja2
+pkgver=2.5.5
+pkgrel=0
+pkgdesc="A small but fast and easy to use stand-alone template engine written in pure python."
+url="http://jinja.pocoo.org/"
+arch="x86 x86_64"
+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"
+}
+
+doc() {
+ cd "$_builddir"
+
+ mkdir -p "$subpkgdir"/usr/share/doc/$pkgname
+ for _doc in AUTHORS CHANGES LICENSE; do
+ install -Dm644 $_doc "$subpkgdir"/usr/share/doc/$pkgname/$_doc
+ 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
+ cp -R ./docs/* "$subpkgdir"/usr/share/doc/$pkgname/docs/
+ chmod -R 644 "$subpkgdir"/usr/share/doc/$pkgname/docs/
+
+ mkdir -p "$subpkgdir"/usr/share/$pkgname
+ for _dir in artwork examples ext; do
+ mkdir -p "$subpkgdir"/usr/share/$pkgname/$_dir/
+ cp -R ./$_dir/* "$subpkgdir"/usr/share/$pkgname/$_dir/
+ chmod -R 644 "$subpkgdir"/usr/share/$pkgname/$_dir/
+ done
+
+ # Fix subdir perms
+ find "$subpkgdir"/usr/share/doc/$pkgname/ -type d -exec chmod 755 '{}' \;
+ find "$subpkgdir"/usr/share/$pkgname/ -type d -exec chmod 755 '{}' \;
+}
+
+md5sums="83b20c1eeb31f49d8e6392efae91b7d5 Jinja2-2.5.5.tar.gz"