1 # Build recipe for gnutls.
3 # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
4 # Copyright (c) 2018 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 .
63 # TODO: `--enable-guile' does not compile under guile-2.2.4.
67 CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
69 --libdir=/usr/lib${libSuffix} \
73 --with-html-dir=${docsdir}/html \
74 --enable-gtk-doc-html=no \
78 --without-included-libtasn1 \
79 --without-included-unistring \
80 --build="$(cc -dumpmachine)"
83 make -j${jobs} DESTDIR="$destdir" install-strip
85 # Compress info documents deleting index file for the package
86 if test -d "${destdir}/$infodir"
88 rm -f "${destdir}/${infodir}/dir"
89 lzip -9 "${destdir}/${infodir}"/*
92 # Compress and link man pages (if needed)
93 if test -d "${destdir}/$mandir"
96 cd "${destdir}/$mandir"
97 find . -type f -exec lzip -9 '{}' +
98 find . -type l | while read -r file
100 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
107 mkdir -p "${destdir}${docsdir}"
108 cp -p $docs "${destdir}${docsdir}/"