1 # Build recipe for libressl.
3 # Copyright (c) 2017-2019, 2021-2022 Matias Fonzo, <selk@dragora.org>.
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
9 # http://www.apache.org/licenses/LICENSE-2.0
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.
17 # Exit immediately on any error
24 # Define a category for the output of the package name
25 pkgcategory=networking
27 tarname=${program}-${version}.tar.gz
30 fetch=https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/$tarname
33 A version of the TLS/crypto stack.
35 LibreSSL is a version of the TLS/crypto stack forked from OpenSSL in
36 2014, with goals of modernizing the codebase, improving security, and
37 applying best practice development processes.
39 Primary development occurs inside the OpenBSD source tree with the
40 usual care the project is known for. On a regular basis the code
41 is re-packaged for portable use by other operating systems (Linux,
42 FreeBSD, Windows, etc).
45 homepage=https://www.libressl.org
48 # Source documentation
49 docs="COPYING ChangeLog README.md VERSION"
50 docsdir="${docdir}/${program}-${version}"
54 unpack "${tardir}/$tarname"
58 # Set sane permissions
59 chmod -R u+w,go-w,a+rX-s .
61 ./configure CPPFLAGS="$QICPPFLAGS" \
62 CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
64 --libdir=/usr/lib${libSuffix} \
69 --with-openssldir=/etc/ssl \
70 --build="$(gcc -dumpmachine)"
73 make -j${jobs} DESTDIR="$destdir" install-strip
75 # This is provided by the ca-certificates package
76 rm -f "${destdir}/etc/ssl/cert.pem"
77 rmdir "${destdir}/etc/ssl/certs"
79 # To manage config file(s)
80 touch "${destdir}/etc/ssl/.graft-config"
82 # Compress and link man pages (if needed)
83 if test -d "${destdir}/$mandir"
86 cd "${destdir}/$mandir"
87 find . -type f -exec lzip -9 {} +
88 find . -type l | while read -r file
90 ln -sf "$(readlink -- $file).lz" "${file}.lz"
96 # Remove broken symlinks
97 find "${destdir}/$mandir" -print | while read -r file
99 if test -L "$file" && test ! -e "$file"
101 echo "Deleting dangling symlink: $file"
107 mkdir -p "${destdir}/$docsdir"
108 cp -p $docs "${destdir}/$docsdir"