recipe 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # Build recipe for gnupg (version 2).
  2. #
  3. # Copyright (c) 2018-2019 Matias Fonzo, <selk@dragora.org>.
  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=gnupg
  17. pkgname=gnupg2
  18. version=2.2.17
  19. release=2
  20. # Set 'outdir' for a nice and well-organized output directory
  21. outdir="${outdir}/${arch}/gnupg"
  22. tarname=${program}-${version}.tar.bz2
  23. # Remote source(s)
  24. fetch=http://www.gnupg.org/ftp/gcrypt/gnupg/$tarname
  25. description="
  26. The GnuPG version 2.
  27. GnuPG 2.0 is the new modularized version of GnuPG supporting
  28. OpenPGP and S/MIME.
  29. "
  30. homepage=http://www.gnupg.org
  31. license="GPLv2+, GPLv3+, LGPLv2+, LGPLv3+ | CC0 1.0 Universal"
  32. # Source documentation
  33. docs="AUTHORS COPYING* ChangeLog NEWS README* THANKS TODO VERSION"
  34. docsdir="${docdir}/${pkgname}-${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. # Make sure to build the gpg-zip program (thanks to BLFS!)
  43. sed -e '/noinst_SCRIPTS = gpg-zip/c sbin_SCRIPTS += gpg-zip' \
  44. -i tools/Makefile.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. --enable-symcryptrun \
  52. --enable-g13 \
  53. --enable-sqlite \
  54. --disable-gpg-is-gpg2 \
  55. --disable-optimization \
  56. --build="$(cc -dumpmachine)"
  57. make -j${jobs} V=1
  58. make -j${jobs} DESTDIR="$destdir" install-strip
  59. # Compress info documents deleting index file for the package
  60. if test -d "${destdir}/$infodir"
  61. then
  62. rm -f "${destdir}/${infodir}/dir"
  63. lzip -9 "${destdir}/${infodir}"/*
  64. fi
  65. # Compress and link man pages (if needed)
  66. if test -d "${destdir}/$mandir"
  67. then
  68. (
  69. cd "${destdir}/$mandir"
  70. find . -type f -exec lzip -9 '{}' +
  71. find . -type l | while read -r file
  72. do
  73. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  74. rm -- "$file"
  75. done
  76. )
  77. fi
  78. # Copy documentation
  79. mkdir -p "${destdir}${docsdir}"
  80. cp -p $docs "${destdir}${docsdir}"
  81. }