recipes: tde/tqt3: make QTDIR visible for the system
[dragora.git] / recipes / networking / gnutls / recipe
blob2336bb006a00e5efaacfd1e2306ef73d25cf2129
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.
18 program=gnutls
19 version=3.6.9
20 release=1
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/networking"
25 tarname=${program}-${version}.tar.xz
27 # Remote source(s)
28 fetch=http://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/"$tarname"
30 description="
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}"
52 build()
54     set -e
56     unpack "${tardir}/$tarname"
58     cd "$srcdir"
60     # Set sane permissions
61     chmod -R u+w,go-w,a+rX-s .
63     ./configure \
64     CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
65     $configure_args \
66     --libdir=/usr/lib${libSuffix} \
67     --infodir=$infodir \
68     --mandir=$mandir \
69     --docdir=$docsdir \
70     --with-html-dir=${docsdir}/html \
71     --enable-gtk-doc-html=no \
72     --enable-static=no \
73     --enable-guile \
74     --with-p11-kit \
75     --without-included-libtasn1 \
76     --without-included-unistring \
77     --build="$(cc -dumpmachine)"
79     make -j${jobs} V=1
80     make -j${jobs} DESTDIR="$destdir" install-strip
82     # Compress info documents deleting index file for the package
83     if test -d "${destdir}/$infodir"
84     then
85         rm -f "${destdir}/${infodir}/dir"
86         lzip -9 "${destdir}/${infodir}"/*
87     fi
89     # Compress and link man pages (if needed)
90     if test -d "${destdir}/$mandir"
91     then
92         (
93             cd "${destdir}/$mandir"
94             find . -type f -exec lzip -9 '{}' +
95             find . -type l | while read -r file
96             do
97                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
98                 rm -- "$file"
99             done
100         )
101     fi
103     # Copy documentation
104     mkdir -p "${destdir}${docsdir}"
105     cp -p $docs "${destdir}${docsdir}/"