recipes: python/*: adjust outdir for the new python/ series
[dragora.git] / recipes / python / mako / recipe
blob145ce633697a86c4df46f4d65d6f5fd74b09b4e5
1 # Build recipe for mako.
3 # Copyright (C) 2019 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 #    http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 program=Mako
18 version=1.1.0
19 release=1
21 pkgname=mako
23 # Set 'outdir' for a nice and well-organized output directory
24 outdir="${outdir}/${arch}/python"
26 tarname=${program}-${version}.tar.gz
28 # Remote source(s)
29 fetch=http://files.pythonhosted.org/packages/b0/3c/8dcd6883d009f7cae0f3157fb53e9afb05a0d3d33b3db1268ec2e6f4a56b/$tarname
31 description="
32 Mako is a template library written in Python.
34 It provides a familiar, non-XML syntax which compiles into Python
35 modules for maximum performance.  Mako's syntax and API borrows
36 from the best ideas of many others, including Django and
37 Jinja2templates, Cheetah, Myghty, and Genshi.  Conceptually,
38 Mako is an embedded Python (i.e. Python Server Page) language,
39 which refines the familiar ideas of componentized layout and
40 inheritance to produce one of the most straightforward and
41 flexible models available, while also maintaining close ties
42 to Python calling and scoping semantics.
45 homepage=http://www.makotemplates.org
46 license=MIT
48 docs="AUTHORS CHANGES LICENSE PKG-INFO README.rst"
49 docsdir="${docdir}/${pkgname}-${version}"
51 build()
53     set -e
55     unpack "${tardir}/$tarname"
57     cd "$srcdir"
59     # Set sane permissions
60     chmod -R u+w,go-w,a+rX-s .
62     # Install for both, Python versions 2 and 3
64     for i in 2 3
65     do
66         python${i} setup.py build
67         python${i} setup.py install --prefix=/usr --root="$destdir" --optimize=1
68     done
69     unset i
71     # Copy documentation
72     mkdir -p "${destdir}${docsdir}"
73     cp -p $docs "${destdir}${docsdir}"