recipe 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # Build recipe for libassuan
  2. #
  3. # Copyright 2016, 2017 Mateus P. Rodrigues <mprodrigues@dragora.org>.
  4. #
  5. # This recipe is free software, under the terms of the Apache License 2.0
  6. program=libassuan
  7. version=2.4.3
  8. release=1
  9. description="
  10. Libassuan is a small library implementing the so-called Assuan
  11. protocol. This protocol is used for IPC between most newer GnuPG
  12. components. Both, server and client side functions are provided.
  13. In an ideal world, Assuan is irrelevant. Assuan's primary use is to
  14. allow a client to interact with a non-persistent server. Using Assuan,
  15. this is accomplished by forking a subprocess and communicating with it
  16. via, for example, a pipe or unix domain socket. This method is neither
  17. elegant nor efficient especially when there is a lot of data spread
  18. across several transactions: not only is there a penalty for an
  19. increased number of context switches, but also a significant amount of
  20. data is memcpy-ed from the client to a file descriptor and from the
  21. file descriptor to the server. Despite these and other disadvantages,
  22. this type of client/server communication can be useful: the client is
  23. completely separate from the server; they are in different address
  24. spaces. This is especially important in situations where the server
  25. must have a known degree of reliability and data must be protected: as
  26. the Assuan protocol is well defined and clients cannot corrupt the
  27. servers' address space, auditing become much easier.
  28. Assuan was developed for use by the GNU Privacy Guard, GnuPG, to
  29. prevent potentially buggy clients from unwittingly corrupting
  30. sensitive transactions or compromising data such as a secret
  31. key. Assuan permits the servers, which do the actual work,
  32. e.g. encryption and decryption of data using a secret key, to be
  33. developed independently of the user interfaces, e.g. mail clients and
  34. other encryption front ends. Like a shared library, the interface is
  35. well defined and any number of front ends can use it; however, unlike
  36. a shared library, the client cannot see or touch the server's data. As
  37. with any modular system, Assuan helps keep the servers small and
  38. understandable, and helps to make code more understandable and less
  39. error prone.
  40. Assuan is not, however, limited to use with GnuPG servers and clients:
  41. it was design to be flexible enough to meet the demands of almost any
  42. transaction based environment with non-persistent servers.
  43. "
  44. homepage=https://www.gnupg.org/related_software/libassuan/index.en.html
  45. license="GPLv2, LGPLv2"
  46. tarname=${program}-${version}.tar.bz2
  47. # Remote source(s)
  48. fetch=https://www.gnupg.org/ftp/gcrypt/libassuan/$tarname
  49. # Source documentation
  50. docs="AUTHORS COPYING* INSTALL NEWS README* THANKS TODO VERSION"
  51. docsdir="${docdir}/${program}-${version}"
  52. build() {
  53. unpack "${tardir}/$tarname"
  54. cd "$srcdir"
  55. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  56. $configure_args \
  57. --libdir=/usr/lib${libSuffix} \
  58. --mandir=$mandir \
  59. --docdir=$docdir \
  60. --build="$(cc -dumpmachine)"
  61. make -j${jobs}
  62. make -j${jobs} install DESTDIR="$destdir"
  63. # Compress and link man pages (if needed)
  64. if [ -d "${destdir}/$mandir" ] ; then
  65. (
  66. cd "${destdir}/$mandir"
  67. find . -type f -exec lzip -9 '{}' +
  68. find . -type l | while read -r file
  69. do
  70. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  71. rm -- "$file"
  72. done
  73. )
  74. fi
  75. # Copy documentation
  76. mkdir -p "${destdir}${docsdir}"
  77. for file in $docs ; do
  78. cp -p $file "${destdir}${docsdir}"
  79. done
  80. }