recipe 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # Build recipe for libgpg-error
  2. #
  3. # Copyright 2016,2018 Mateus P. Rodrigues <mprodrigues@dragora.org>.
  4. #
  5. # This recipe is free software, under the terms of the Apache License 2.0
  6. program=libgpg-error
  7. version=1.27
  8. release=1
  9. description="
  10. Libgpg-error is a small library that defines common error values for
  11. all GnuPG components. Among these are GPG, GPGSM, GPGME, GPG-Agent,
  12. libgcrypt, Libksba, DirMngr, Pinentry, SmartCard Daemon and possibly
  13. more in the future.
  14. "
  15. homepage=http://www.gnupg.org/related_software/libgpg-error/index.html
  16. license="GPLv2, LGPLv2"
  17. tarname=${program}-${version}.tar.bz2
  18. # Remote source(s)
  19. fetch=https://www.gnupg.org/ftp/gcrypt/libgpg-error/$tarname
  20. # Source documentation
  21. docs="ABOUT-NLS AUTHORS COPYING* NEWS README THANKS VERSION"
  22. docsdir="${docdir}/${program}-${version}"
  23. build() {
  24. unpack "${tardir}/$tarname"
  25. cd "$srcdir"
  26. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  27. $configure_args \
  28. --libdir=/usr/lib${libSuffix} \
  29. --infodir=$infodir \
  30. --mandir=$mandir \
  31. --docdir=$docdir \
  32. --build="$(cc -dumpmachine)"
  33. make -j${jobs} V=1
  34. make -j${jobs} DESTDIR="$destdir" install
  35. # Compress info documents deleting index file for the package
  36. if test -d "${destdir}/$infodir"
  37. then
  38. rm -f "${destdir}/${infodir}/dir"
  39. lzip -9 "${destdir}/${infodir}"/*
  40. fi
  41. # Compress and link man pages (if needed)
  42. if test -d "${destdir}/$mandir"
  43. then
  44. (
  45. cd "${destdir}/$mandir"
  46. find . -type f -exec lzip -9 '{}' +
  47. find . -type l | while read -r file
  48. do
  49. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  50. rm -- "$file"
  51. done
  52. )
  53. fi
  54. # Copy documentation
  55. mkdir -p "${destdir}${docsdir}"
  56. cp -p $docs "${destdir}${docsdir}"
  57. }