recipe 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # Build recipe for Pango.
  2. #
  3. # Copyright (C) 2018, MMPG <mmpg@vp.pl>
  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=pango
  17. version=1.42.0
  18. release=1
  19. tarname=${program}-${version}.tar.xz
  20. # Remote source(s)
  21. fetch=http://ftp.gnome.org/pub/gnome/sources/pango/1.42/$tarname
  22. description="
  23. A library for layout and rendering of text.
  24. Pango can be used anywhere that text layout is needed;
  25. however, most of the work on Pango was done using the GTK+
  26. widget toolkit as a test platform. Pango forms the core of text and
  27. font handling for GTK+-2.
  28. "
  29. homepage=http://www.pango.org/Introduction/
  30. license=LGPLv2
  31. # Copy documentation
  32. docs="AUTHORS COPYING HACKING MAINTAINERS NEWS README THANKS"
  33. docsdir="${docdir}/${program}-${version}"
  34. build()
  35. {
  36. set -e
  37. unpack "${tardir}/$tarname"
  38. cd "$srcdir"
  39. mkdir -pv build
  40. cd build
  41. meson $configure_args
  42. ninja
  43. DESTDIR="$destdir" ninja install
  44. # Compress info documents deleting index file for the package
  45. if test -d "${destdir}/$infodir"
  46. then
  47. rm -f "${destdir}/${infodir}/dir"
  48. lzip -9 "${destdir}/${infodir}"/*
  49. fi
  50. # Compress and link man pages (if needed)
  51. if test -d "${destdir}/$mandir"
  52. then
  53. (
  54. cd "${destdir}/$mandir"
  55. find . -type f -exec lzip -9 '{}' +
  56. find . -type l | while read -r file
  57. do
  58. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  59. rm -- "$file"
  60. done
  61. )
  62. fi
  63. # Copy documentation
  64. cd ..
  65. mkdir -p "${destdir}${docsdir}"
  66. for file in $docs
  67. do
  68. cp -p $file "${destdir}${docsdir}"
  69. done
  70. }