blob: 94c2ba48ab5691a1bd30f6c83eb1932a212407eb (
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
|
# Contributor: Matt Smith <mcs@darkregion.net>
# Maintainer: Matt Smith <mcs@darkregion.net>
pkgname=py-jinja2
_pkgname=Jinja2
pkgver=2.7
pkgrel=1
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 py-markupsafe"
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="c2fb12cbbb523c57d3d15bfe4dc0e8fe Jinja2-2.7.tar.gz"
sha256sums="474f1518d189ae7e318b139fecc1d30b943f124448cfa0f09582ca23e069fa4d Jinja2-2.7.tar.gz"
sha512sums="44d0c18babcdb84160eeea077ec6dbd63bc4669ee81b0f5849bc42a9d9665b3e6647ce64ea2e15f04940807a67f25ebcf937da217318dea3d3dc1531800422b1 Jinja2-2.7.tar.gz"
|