recipe 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Build recipe for mako.
  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=Mako
  19. version=1.2.4
  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/05/5f/2ba6e026d33a0e6ddc1dddf9958677f76f5f80c236bd65309d280b166d3e/$tarname
  27. description="
  28. Mako is a template library written in Python.
  29. It provides a familiar, non-XML syntax which compiles into Python
  30. modules for maximum performance. Mako's syntax and API borrows
  31. from the best ideas of many others, including Django and
  32. Jinja2templates, Cheetah, Myghty, and Genshi. Conceptually,
  33. Mako is an embedded Python (i.e. Python Server Page) language,
  34. which refines the familiar ideas of componentized layout and
  35. inheritance to produce one of the most straightforward and
  36. flexible models available, while also maintaining close ties
  37. to Python calling and scoping semantics.
  38. The package name is called \"pymako\" in order to avoid possible
  39. conflicts with another package name.
  40. "
  41. homepage=https://www.makotemplates.org
  42. license=MIT
  43. docs="AUTHORS CHANGES LICENSE PKG-INFO README.rst"
  44. docsdir="${docdir}/${pkgname}-${version}"
  45. build()
  46. {
  47. unpack "${tardir}/$tarname"
  48. cd "$srcdir"
  49. # Set sane permissions
  50. chmod -R u+w,go-w,a+rX-s .
  51. python3 setup.py build
  52. python3 setup.py install --prefix=/usr --root="$destdir" --optimize=1
  53. # Copy documentation
  54. mkdir -p "${destdir}/$docsdir"
  55. cp -p $docs "${destdir}/$docsdir"
  56. }