recipes: Adjust 'docsdir' variable to be consistent with the current recipe format
[dragora.git] / recipes / python / mako / recipe
blob2df0769883ffcce09dfed910bc2adaba9851848c
1 # Build recipe for mako.
3 # Copyright (C) 2019-2022 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 # Exit immediately on any error
18 set -e
20 program=Mako
21 version=1.1.6
22 release=1
24 pkgname=python-${program}
26 # Define a category for the output of the package name
27 pkgcategory=python
29 tarname=${program}-${version}.tar.gz
31 # Remote source(s)
32 fetch=https://files.pythonhosted.org/packages/af/b6/42cd322ae555aa770d49e31b8c5c28a243ba1bbb57ad927e1a5f5b064811/$tarname
34 description="
35 Mako is a template library written in Python.
37 It provides a familiar, non-XML syntax which compiles into Python
38 modules for maximum performance.  Mako's syntax and API borrows
39 from the best ideas of many others, including Django and
40 Jinja2templates, Cheetah, Myghty, and Genshi.  Conceptually,
41 Mako is an embedded Python (i.e. Python Server Page) language,
42 which refines the familiar ideas of componentized layout and
43 inheritance to produce one of the most straightforward and
44 flexible models available, while also maintaining close ties
45 to Python calling and scoping semantics.
47 The package name is called \"pymako\" in order to avoid possible
48 conflicts with another package name.
51 homepage=https://www.makotemplates.org
52 license=MIT
54 docs="AUTHORS CHANGES LICENSE PKG-INFO README.rst"
55 docsdir="${docdir}/${pkgname}-${version}"
57 build()
59     unpack "${tardir}/$tarname"
61     cd "$srcdir"
63     # Set sane permissions
64     chmod -R u+w,go-w,a+rX-s .
66     python3 setup.py build
67     python3 setup.py install --prefix=/usr --root="$destdir" --optimize=1
69     # Copy documentation
70     mkdir -p "${destdir}/$docsdir"
71     cp -p $docs "${destdir}/$docsdir"