recipe 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. # Build recipe for gnutls.
  2. #
  3. # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
  4. # Copyright (c) 2018-2019 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=gnutls
  18. version=3.6.9
  19. release=1
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/networking"
  22. tarname=${program}-${version}.tar.xz
  23. # Remote source(s)
  24. fetch=http://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/"$tarname"
  25. description="
  26. The GnuTLS Transport Layer Security Library.
  27. GnuTLS is a secure communications library implementing the SSL, TLS and
  28. DTLS protocols and technologies around them. It provides a simple C
  29. language application programming interface (API) to access the secure
  30. communications protocols as well as APIs to parse and write X.509,
  31. PKCS #12, and other required structures.
  32. The project strives to provide a secure communications back-end, simple
  33. to use and integrated with the rest of the base Linux libraries. A
  34. back-end designed to work and be secure out of the box, keeping the TLS
  35. and PKI complexity outside the applications.
  36. "
  37. homepage=http://gnutls.org/
  38. license="LGPLv2+, GPLv3+, GFDL1.3"
  39. # Source documentation
  40. docs="AUTHORS CONTRIBUTING.md ChangeLog LICENSE NEWS README.md THANKS"
  41. docsdir="${docdir}/${program}-${version}"
  42. build()
  43. {
  44. set -e
  45. unpack "${tardir}/$tarname"
  46. cd "$srcdir"
  47. # Set sane permissions
  48. chmod -R u+w,go-w,a+rX-s .
  49. ./configure \
  50. CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
  51. $configure_args \
  52. --libdir=/usr/lib${libSuffix} \
  53. --infodir=$infodir \
  54. --mandir=$mandir \
  55. --docdir=$docsdir \
  56. --with-html-dir=${docsdir}/html \
  57. --enable-gtk-doc-html=no \
  58. --enable-static=no \
  59. --enable-guile \
  60. --with-p11-kit \
  61. --without-included-libtasn1 \
  62. --without-included-unistring \
  63. --build="$(cc -dumpmachine)"
  64. make -j${jobs} V=1
  65. make -j${jobs} DESTDIR="$destdir" install-strip
  66. # Compress info documents deleting index file for the package
  67. if test -d "${destdir}/$infodir"
  68. then
  69. rm -f "${destdir}/${infodir}/dir"
  70. lzip -9 "${destdir}/${infodir}"/*
  71. fi
  72. # Compress and link man pages (if needed)
  73. if test -d "${destdir}/$mandir"
  74. then
  75. (
  76. cd "${destdir}/$mandir"
  77. find . -type f -exec lzip -9 '{}' +
  78. find . -type l | while read -r file
  79. do
  80. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  81. rm -- "$file"
  82. done
  83. )
  84. fi
  85. # Copy documentation
  86. mkdir -p "${destdir}${docsdir}"
  87. cp -p $docs "${destdir}${docsdir}/"
  88. }