recipe 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # Build recipe for babel.
  2. #
  3. # Copyright (C) 2019 Kevin "The Nuclear" Bloom, <nuclearkev@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=Babel
  17. version=2.6.0
  18. release=1
  19. # Set 'outdir' for a nice and well-organized output directory
  20. outdir="${outdir}/${arch}/devel"
  21. tarname=${program}-${version}.tar.gz
  22. # Remote source(s)
  23. # fetch=https://files.pythonhosted.org/packages/be/cc/9c981b249a455fa0c76338966325fc70b7265521bad641bf2932f77712f4/$tarname
  24. description="
  25. babel - python lib for web-based apps
  26. Babel is a Python library that provides an
  27. integrated collection of utilities that assist with internationalizing
  28. and localizing Python applications (in particular web-based
  29. applications.)
  30. "
  31. homepage=http://babel.pocoo.org/
  32. license="Custom"
  33. # Source documentation
  34. docs="AUTHORS CHANGES README* LICENSE MANIFEST* PKG-INFO"
  35. docsdir="${docdir}/${program}-${version}"
  36. build()
  37. {
  38. set -e
  39. unpack "${tardir}/$tarname"
  40. cd "$srcdir"
  41. # Set sane permissions
  42. chmod -R u+w,go-w,a+rX-s .
  43. python setup.py install \
  44. --prefix=/usr \
  45. --root="$destdir"
  46. # Compress and link man pages (if needed)
  47. if test -d "${destdir}/$mandir"
  48. then
  49. (
  50. cd "${destdir}/$mandir"
  51. find . -type f -exec lzip -9 '{}' +
  52. find . -type l | while read -r file
  53. do
  54. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  55. rm -- "$file"
  56. done
  57. )
  58. fi
  59. # Copy documentation
  60. mkdir -p "${destdir}${docsdir}"
  61. cp -p $docs "${destdir}${docsdir}"
  62. }