recipes: xorg/mesa: upgraded to version 18.3.2
[dragora.git] / recipes / networking / gnutls / recipe
blob88ad7f832155c313c18278b0fc57fbc2921e3bbb
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.
18 program=gnutls
19 version=3.6.5
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     # TODO: `--enable-guile' does not compile under guile-2.2.4.
64     # Disable it for now.
66     ./configure \
67     CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
68     $configure_args \
69     --libdir=/usr/lib${libSuffix} \
70     --infodir=$infodir \
71     --mandir=$mandir \
72     --docdir=$docsdir \
73     --with-html-dir=${docsdir}/html \
74     --enable-gtk-doc-html=no \
75     --enable-static=no \
76     --disable-guile \
77     --with-p11-kit \
78     --without-included-libtasn1 \
79     --without-included-unistring \
80     --build="$(cc -dumpmachine)"
82     make -j${jobs} V=1
83     make -j${jobs} DESTDIR="$destdir" install-strip
85     # Compress info documents deleting index file for the package
86     if test -d "${destdir}/$infodir"
87     then
88         rm -f "${destdir}/${infodir}/dir"
89         lzip -9 "${destdir}/${infodir}"/*
90     fi
92     # Compress and link man pages (if needed)
93     if test -d "${destdir}/$mandir"
94     then
95         (
96             cd "${destdir}/$mandir"
97             find . -type f -exec lzip -9 '{}' +
98             find . -type l | while read -r file
99             do
100                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
101                 rm -- "$file"
102             done
103         )
104     fi
106     # Copy documentation
107     mkdir -p "${destdir}${docsdir}"
108     cp -p $docs "${destdir}${docsdir}/"