recipe 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # Build recipe for intltool.
  2. #
  3. # Copyright (c) 2017 Mateus P. Rodrigues <mprodrigues@dragora.org>.
  4. # Copyright (c) 2017-2018 Matias Fonzo, <selk@dragora.org>.
  5. #
  6. # Licensed under the Apache License, Version 2.0 (the "License");
  7. # you may not use this file except in compliance with the License.
  8. # You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. program=intltool
  18. version=0.51.0
  19. release=1
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/tools"
  22. tarname=${program}-${version}.tar.gz
  23. # Remote source(s)
  24. fetch=https://launchpad.net/intltool/trunk/${version}/+download/$tarname
  25. description="
  26. Tools for internationalization.
  27. intltool is a set of tools to centralize translation of many
  28. different file formats using GNU gettext-compatible PO files.
  29. "
  30. homepage=http://freedesktop.org/wiki/Software/intltool
  31. license=GPLv2
  32. # Source documentation
  33. docs="AUTHORS COPYING ChangeLog README TODO"
  34. docsdir="${docdir}/${program}-${version}"
  35. build()
  36. {
  37. set -e
  38. unpack "${tardir}/$tarname"
  39. cd "$srcdir"
  40. # Set sane permissions
  41. chmod -R u+w,go-w,a+rX-s .
  42. # Fix a warning that is caused by perl-5.22+
  43. # (thanks to "Linux From Scratch")
  44. sed -i 's:\\\${:\\\$\\{:' intltool-update.in
  45. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  46. $configure_args \
  47. --libdir=/usr/lib${libSuffix} \
  48. --infodir=$infodir \
  49. --mandir=$mandir \
  50. --docdir=$docsdir \
  51. --build="$(cc -dumpmachine)"
  52. make -j${jobs} V=1
  53. make -j${jobs} DESTDIR="$destdir" install
  54. # Compress and link man pages (if needed)
  55. if test -d "${destdir}/$mandir"
  56. then
  57. (
  58. cd "${destdir}/$mandir"
  59. find . -type f -exec lzip -9 '{}' +
  60. find . -type l | while read -r file
  61. do
  62. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  63. rm -- "$file"
  64. done
  65. )
  66. fi
  67. # Copy documentation
  68. mkdir -p "${destdir}${docsdir}"
  69. cp -p $docs "${destdir}${docsdir}"
  70. }