1 # Build recipe for gnutls.
3 # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
4 # Copyright (c) 2018-2019 Matias Fonzo, <selk@dragora.org>.
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
10 # http://www.apache.org/licenses/LICENSE-2.0
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.
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/networking"
25 tarname=${program}-${version}.tar.xz
28 fetch=http://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/"$tarname"
31 The GnuTLS Transport Layer Security Library.
33 GnuTLS is a secure communications library implementing the SSL, TLS and
34 DTLS protocols and technologies around them. It provides a simple C
35 language application programming interface (API) to access the secure
36 communications protocols as well as APIs to parse and write X.509,
37 PKCS #12, and other required structures.
39 The project strives to provide a secure communications back-end, simple
40 to use and integrated with the rest of the base Linux libraries. A
41 back-end designed to work and be secure out of the box, keeping the TLS
42 and PKI complexity outside the applications.
45 homepage=http://gnutls.org/
46 license="LGPLv2+, GPLv3+, GFDL1.3"
48 # Source documentation
49 docs="AUTHORS CONTRIBUTING.md ChangeLog LICENSE NEWS README.md THANKS"
50 docsdir="${docdir}/${program}-${version}"
56 unpack "${tardir}/$tarname"
60 # Set sane permissions
61 chmod -R u+w,go-w,a+rX-s .
64 CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
66 --libdir=/usr/lib${libSuffix} \
70 --with-html-dir=${docsdir}/html \
71 --enable-gtk-doc-html=no \
75 --without-included-libtasn1 \
76 --without-included-unistring \
77 --build="$(cc -dumpmachine)"
80 make -j${jobs} DESTDIR="$destdir" install-strip
82 # Compress info documents deleting index file for the package
83 if test -d "${destdir}/$infodir"
85 rm -f "${destdir}/${infodir}/dir"
86 lzip -9 "${destdir}/${infodir}"/*
89 # Compress and link man pages (if needed)
90 if test -d "${destdir}/$mandir"
93 cd "${destdir}/$mandir"
94 find . -type f -exec lzip -9 '{}' +
95 find . -type l | while read -r file
97 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
104 mkdir -p "${destdir}${docsdir}"
105 cp -p $docs "${destdir}${docsdir}/"