qi: doc: added 'Order files' section to the manual
[dragora.git] / recipes / gnupg / gnupg2 / recipe
blob5abc2cf876ca8edb97d8ef1412d1c7cc7f55c1f5
1 # Build recipe for gnupg (version 2).
3 # Copyright (c) 2018 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 program=gnupg
18 pkgname=gnupg2
19 version=2.2.12
20 release=1
22 # Set 'outdir' for a nice and well-organized output directory
23 outdir="${outdir}/${arch}/gnupg"
25 tarname=${program}-${version}.tar.bz2
27 # Remote source(s)
28 fetch=https://www.gnupg.org/ftp/gcrypt/gnupg/$tarname
30 description="
31 The GnuPG version 2.
33 GnuPG 2.0 is the new modularized version of GnuPG supporting
34 OpenPGP and S/MIME.
37 homepage=http://www.gnupg.org
38 license="GPLv2+, GPLv3+, LGPLv2+, LGPLv3+ | CC0 1.0 Universal"
40 # Source documentation
41 docs="AUTHORS COPYING* ChangeLog NEWS README* THANKS TODO VERSION"
42 docsdir="${docdir}/${pkgname}-${version}"
44 build()
46     set -e
48     unpack "${tardir}/$tarname"
50     cd "$srcdir"
52     # Set sane permissions
53     chmod -R u+w,go-w,a+rX-s .
55     # Make sure to build the gpg-zip program (thanks to BLFS!)
56     sed -e '/noinst_SCRIPTS = gpg-zip/c sbin_SCRIPTS += gpg-zip' \
57         -i tools/Makefile.in
59     ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
60      $configure_args \
61      --libdir=/usr/lib${libSuffix} \
62      --infodir=$infodir \
63      --mandir=$mandir \
64      --docdir=$docsdir \
65      --enable-symcryptrun \
66      --enable-g13 \
67      --disable-gpg-is-gpg2 \
68      --disable-optimization \
69      --disable-sqlite \
70      --build="$(cc -dumpmachine)"
72     make -j${jobs} V=1
73     make -j${jobs} DESTDIR="$destdir" install-strip
75     # Compress info documents deleting index file for the package
76     if test -d "${destdir}/$infodir"
77     then
78         rm -f "${destdir}/${infodir}/dir"
79         lzip -9 "${destdir}/${infodir}"/*
80     fi
82     # Compress and link man pages (if needed)
83     if test -d "${destdir}/$mandir"
84     then
85         (
86             cd "${destdir}/$mandir"
87             find . -type f -exec lzip -9 '{}' +
88             find . -type l | while read -r file
89             do
90                 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
91                 rm -- "$file"
92             done
93         )
94     fi
96     # Copy documentation
97     mkdir -p "${destdir}${docsdir}"
98     cp -p $docs "${destdir}${docsdir}"