recipes: Rename 'pkghashtag' variable to 'pkgcategory'
[dragora.git] / recipes / python / markupsafe / recipe
blobdc524a074dbfa36aa5de96d5a1a831915f6c826a
1 # Build recipe for markupsafe.
3 # Copyright (C) 2019-2020 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=MarkupSafe
18 version=1.1.1
19 release=3
21 pkgname=markupsafe
23 # Define a category for the output of the package name
24 pkgcategory=python
26 tarname=${program}-${version}.tar.gz
28 # Remote source(s)
29 fetch=http://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/$tarname
31 description="
32 A Python module that implements a XML/HTML/XHTML Markup safe string.
34 MarkupSafe implements a text object that escapes characters so it is
35 safe to use in HTML and XML.  Characters that have special meanings
36 are replaced so that they display as the actual characters.  This
37 mitigates injection attacks, meaning untrusted user input can safely
38 be displayed on a page.  Escaping is implemented in C so it is as
39 efficient as possible.
42 homepage=http://palletsprojects.com/p/markupsafe
43 license="BSD License (BSD-3-Clause)"
45 docs="CHANGES* LICENSE* PKG-INFO README*"
46 docsdir="${docdir}/${pkgname}-${version}"
48 build()
50     set -e
52     unpack "${tardir}/$tarname"
54     cd "$srcdir"
56     # Set sane permissions
57     chmod -R u+w,go-w,a+rX-s .
59     python3 setup.py build
60     python3 setup.py install --prefix=/usr --root="$destdir" --optimize=1
62     # Copy documentation
63     mkdir -p "${destdir}${docsdir}"
64     cp -p $docs "${destdir}${docsdir}"