recipe 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # Build recipe for libressl.
  2. #
  3. # Copyright (c) 2017-2018 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=libressl
  17. version=2.7.2
  18. release=1
  19. tarname=${program}-${version}.tar.gz
  20. # Remote source(s)
  21. fetch=http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/$tarname
  22. description="
  23. A version of the TLS/crypto stack.
  24. LibreSSL is a version of the TLS/crypto stack forked from OpenSSL in
  25. 2014, with goals of modernizing the codebase, improving security, and
  26. applying best practice development processes.
  27. Primary development occurs inside the OpenBSD source tree with the
  28. usual care the project is known for. On a regular basis the code
  29. is re-packaged for portable use by other operating systems (Linux,
  30. FreeBSD, Windows, etc).
  31. "
  32. homepage=http://www.libressl.org
  33. license=Custom
  34. # Source documentation
  35. docs="COPYING ChangeLog README.md VERSION"
  36. docsdir="${docdir}/${program}-${version}"
  37. build()
  38. {
  39. set -e
  40. unpack "${tardir}/$tarname"
  41. cd "$srcdir"
  42. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  43. $configure_args \
  44. --libdir=/usr/lib${libSuffix} \
  45. --mandir=$mandir \
  46. --docdir=$docsdir \
  47. --enable-hardening \
  48. --with-openssldir=/etc/ssl \
  49. --build="$(cc -dumpmachine)"
  50. make -j${jobs} V=1
  51. make -j${jobs} DESTDIR="$destdir" install-strip
  52. # To manage config file(s)
  53. touch "${destdir}/etc/ssl/.graft-config"
  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. }