recipe 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # Build recipe for markupsafe.
  2. #
  3. # Copyright (C) 2019-2022 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. # Exit immediately on any error
  17. set -e
  18. program=MarkupSafe
  19. version=2.1.1
  20. release=1
  21. pkgname=python-${program}
  22. # Define a category for the output of the package name
  23. pkgcategory=python
  24. tarname=${program}-${version}.tar.gz
  25. # Remote source(s)
  26. fetch=https://files.pythonhosted.org/packages/1d/97/2288fe498044284f39ab8950703e88abbac2abbdf65524d576157af70556/$tarname
  27. description="
  28. A Python module that implements a XML/HTML/XHTML Markup safe string.
  29. MarkupSafe implements a text object that escapes characters so it is
  30. safe to use in HTML and XML. Characters that have special meanings
  31. are replaced so that they display as the actual characters. This
  32. mitigates injection attacks, meaning untrusted user input can safely
  33. be displayed on a page. Escaping is implemented in C so it is as
  34. efficient as possible.
  35. "
  36. homepage=https://palletsprojects.com/p/markupsafe
  37. license="BSD License (BSD-3-Clause)"
  38. docs="CHANGES* LICENSE* PKG-INFO README*"
  39. docsdir="${docdir}/${pkgname}-${version}"
  40. build()
  41. {
  42. unpack "${tardir}/$tarname"
  43. cd "$srcdir"
  44. # Set sane permissions
  45. chmod -R u+w,go-w,a+rX-s .
  46. python3 setup.py build
  47. python3 setup.py install --prefix=/usr --root="$destdir" --optimize=1
  48. # Copy documentation
  49. mkdir -p "${destdir}/$docsdir"
  50. cp -p $docs "${destdir}/$docsdir"
  51. }