recipe 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # Build recipe for dejavu-fonts-ttf.
  2. #
  3. # Copyright (c) 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=dejavu-fonts-ttf
  19. version=2.37
  20. arch=noarch
  21. release=1
  22. # Define a category for the output of the package name
  23. pkgcategory=xorg_extra
  24. tarname=${program}-${version}.tar.bz2
  25. # Remote source(s)
  26. fetch=https://github.com/dejavu-fonts/dejavu-fonts/releases/download/version_2_37/$tarname
  27. description="
  28. DejaVu (True Type) Fonts.
  29. The DejaVu fonts are a font family based on the Vera Fonts. Its purpose is
  30. to provide a wider range of characters while maintaining the original look
  31. and feel through the process of collaborative development (see authors),
  32. under a Free license.
  33. "
  34. homepage=https://dejavu-fonts.github.io
  35. license="GPLv2+ | Public domain"
  36. # Source documentation
  37. docs="AUTHORS BUGS LICENSE NEWS README.md *.txt"
  38. docsdir="${docdir}/${program}-${version}"
  39. build()
  40. {
  41. unpack "${tardir}/$tarname"
  42. cd "$srcdir"
  43. # Set sane permissions
  44. chmod -R u+w,go-w,a+rX-s .
  45. # Prepare package directories
  46. mkdir -p "${destdir}/usr/share/fonts/X11/TTF" \
  47. "${destdir}/etc/fonts/conf.avail" \
  48. "${destdir}/etc/fonts/conf.d"
  49. # Copy True Type Fonts for package destination
  50. for file in ttf/*.ttf
  51. do
  52. install -p -m 644 "$file" "${destdir}/usr/share/fonts/X11/TTF"
  53. done
  54. # Add config files for 'fontconfig'
  55. for file in fontconfig/*.conf
  56. do
  57. install -p -m 644 "$file" "${destdir}/etc/fonts/conf.avail"
  58. ( cd "${destdir}/etc/fonts/conf.d" && ln -sf "../conf.avail/${file##*/}" . )
  59. done
  60. # Copy documentation
  61. mkdir -p "${destdir}/$docsdir"
  62. cp -p $docs "${destdir}/$docsdir"
  63. }