recipe 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # Build recipe for markupsafe.
  2. #
  3. # Copyright (C) 2019-2020 Matias Fonzo, <selk@dragora.org>.
  4. #
  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
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  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.
  16. program=MarkupSafe
  17. version=1.1.1
  18. release=3
  19. pkgname=markupsafe
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/python"
  22. tarname=${program}-${version}.tar.gz
  23. # Remote source(s)
  24. fetch=http://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/$tarname
  25. description="
  26. A Python module that implements a XML/HTML/XHTML Markup safe string.
  27. MarkupSafe implements a text object that escapes characters so it is
  28. safe to use in HTML and XML. Characters that have special meanings
  29. are replaced so that they display as the actual characters. This
  30. mitigates injection attacks, meaning untrusted user input can safely
  31. be displayed on a page. Escaping is implemented in C so it is as
  32. efficient as possible.
  33. "
  34. homepage=http://palletsprojects.com/p/markupsafe
  35. license="BSD License (BSD-3-Clause)"
  36. docs="CHANGES* LICENSE* PKG-INFO README*"
  37. docsdir="${docdir}/${pkgname}-${version}"
  38. build()
  39. {
  40. set -e
  41. unpack "${tardir}/$tarname"
  42. cd "$srcdir"
  43. # Set sane permissions
  44. chmod -R u+w,go-w,a+rX-s .
  45. python3 setup.py build
  46. python3 setup.py install --prefix=/usr --root="$destdir" --optimize=1
  47. # Copy documentation
  48. mkdir -p "${destdir}${docsdir}"
  49. cp -p $docs "${destdir}${docsdir}"
  50. }