diff options
author | Matt Smith <mcs@darkregion.net> | 2010-12-14 23:29:05 -0600 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-12-16 10:30:51 +0000 |
commit | 5e508732ea1b23ac92b8cd3735f917b697e0f0ad (patch) | |
tree | 556a24eeb5354819f546736f2f3a946c19cf9698 | |
parent | 3cf6576605e60c17e0a03ac031d89ca2115922ee (diff) | |
download | alpine_aports-5e508732ea1b23ac92b8cd3735f917b697e0f0ad.tar.bz2 alpine_aports-5e508732ea1b23ac92b8cd3735f917b697e0f0ad.tar.xz alpine_aports-5e508732ea1b23ac92b8cd3735f917b697e0f0ad.zip |
testing/py-jinja2: new aport
-rw-r--r-- | testing/py-jinja2/APKBUILD | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/testing/py-jinja2/APKBUILD b/testing/py-jinja2/APKBUILD new file mode 100644 index 0000000000..31aa7dcf03 --- /dev/null +++ b/testing/py-jinja2/APKBUILD | |||
@@ -0,0 +1,61 @@ | |||
1 | # Contributor: Matt Smith <mcs@darkregion.net> | ||
2 | # Maintainer: Matt Smith <mcs@darkregion.net> | ||
3 | pkgname=py-jinja2 | ||
4 | _pkgname=Jinja2 | ||
5 | pkgver=2.5.5 | ||
6 | pkgrel=0 | ||
7 | pkgdesc="A small but fast and easy to use stand-alone template engine written in pure python." | ||
8 | url="http://jinja.pocoo.org/" | ||
9 | arch="x86 x86_64" | ||
10 | license="BSD" | ||
11 | depends="python" | ||
12 | makedepends="python-dev py-setuptools" | ||
13 | install= | ||
14 | subpackages="$pkgname-doc" | ||
15 | source="http://pypi.python.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" | ||
16 | |||
17 | _builddir="$srcdir"/$_pkgname-$pkgver | ||
18 | |||
19 | prepare() { | ||
20 | cd "$_builddir" | ||
21 | # apply patches here | ||
22 | } | ||
23 | |||
24 | build() { | ||
25 | cd "$_builddir" | ||
26 | python setup.py build || return 1 | ||
27 | } | ||
28 | |||
29 | package() { | ||
30 | cd "$_builddir" | ||
31 | python setup.py install --root "$pkgdir" | ||
32 | } | ||
33 | |||
34 | doc() { | ||
35 | cd "$_builddir" | ||
36 | |||
37 | mkdir -p "$subpkgdir"/usr/share/doc/$pkgname | ||
38 | for _doc in AUTHORS CHANGES LICENSE; do | ||
39 | install -Dm644 $_doc "$subpkgdir"/usr/share/doc/$pkgname/$_doc | ||
40 | done | ||
41 | |||
42 | # Note: The documentation in the docs directory needs to be generated | ||
43 | # by py-sphinx, however, this package (py-jinja2) is a dependency of | ||
44 | # Sphinx itself! | ||
45 | mkdir -p "$subpkgdir"/usr/share/doc/$pkgname/docs | ||
46 | cp -R ./docs/* "$subpkgdir"/usr/share/doc/$pkgname/docs/ | ||
47 | chmod -R 644 "$subpkgdir"/usr/share/doc/$pkgname/docs/ | ||
48 | |||
49 | mkdir -p "$subpkgdir"/usr/share/$pkgname | ||
50 | for _dir in artwork examples ext; do | ||
51 | mkdir -p "$subpkgdir"/usr/share/$pkgname/$_dir/ | ||
52 | cp -R ./$_dir/* "$subpkgdir"/usr/share/$pkgname/$_dir/ | ||
53 | chmod -R 644 "$subpkgdir"/usr/share/$pkgname/$_dir/ | ||
54 | done | ||
55 | |||
56 | # Fix subdir perms | ||
57 | find "$subpkgdir"/usr/share/doc/$pkgname/ -type d -exec chmod 755 '{}' \; | ||
58 | find "$subpkgdir"/usr/share/$pkgname/ -type d -exec chmod 755 '{}' \; | ||
59 | } | ||
60 | |||
61 | md5sums="83b20c1eeb31f49d8e6392efae91b7d5 Jinja2-2.5.5.tar.gz" | ||