blob: 631df8ac9d7556aa73980c80c6d4ba8a5079e400 [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001SUMMARY = "GNU Privacy Guard - encryption and signing tools (2.x)"
2DESCRIPTION = "A complete and free implementation of the OpenPGP standard \
3as defined by RFC4880 (also known as PGP). GnuPG allows you to encrypt \
4and sign your data and communications; it features a versatile key \
5management system, along with access modules for all kinds of public \
6key directories."
7HOMEPAGE = "http://www.gnupg.org/"
8LICENSE = "GPL-3.0-only & LGPL-3.0-only"
9LIC_FILES_CHKSUM = "file://COPYING;md5=189af8afca6d6075ba6c9e0aa8077626 \
10 file://COPYING.LGPL3;md5=a2b6bf2cb38ee52619e60f30a1fc7257"
11
12DEPENDS = "npth libassuan libksba zlib bzip2 readline libgcrypt"
13
14inherit autotools gettext texinfo pkgconfig
15
16UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
17SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
18 file://0002-use-pkgconfig-instead-of-npth-config.patch \
19 file://0004-autogen.sh-fix-find-version-for-beta-checking.patch \
20 file://0001-Woverride-init-is-not-needed-with-gcc-9.patch \
21 "
22SRC_URI:append:class-native = " file://0001-configure.ac-use-a-custom-value-for-the-location-of-.patch \
23 file://relocate.patch"
24SRC_URI:append:class-nativesdk = " file://relocate.patch"
25
Patrick Williams520786c2023-06-25 16:20:36 -050026SRC_URI[sha256sum] = "97eb47df8ae5a3ff744f868005a090da5ab45cb48ee9836dbf5ee739a4e5cf49"
Andrew Geissler517393d2023-01-13 08:55:19 -060027
28EXTRA_OECONF = "--disable-ldap \
29 --disable-ccid-driver \
30 --with-zlib=${STAGING_LIBDIR}/.. \
31 --with-bzip2=${STAGING_LIBDIR}/.. \
32 --with-readline=${STAGING_LIBDIR}/.. \
33 --with-mailprog=${sbindir}/sendmail \
34 --enable-gpg-is-gpg2 \
35 "
Patrick Williams2a254922023-08-11 09:48:11 -050036# yat2m can be found from recipe-sysroot-native non-deterministically with different versioning otherwise
37CACHED_CONFIGUREVARS += "ac_cv_path_YAT2M=./yat2m"
Andrew Geissler517393d2023-01-13 08:55:19 -060038
39# A minimal package containing just enough to run gpg+gpgagent (E.g. use gpgme in opkg)
40PACKAGES =+ "${PN}-gpg"
41FILES:${PN}-gpg = " \
42 ${bindir}/gpg \
43 ${bindir}/gpg2 \
44 ${bindir}/gpg-agent \
45"
46
47# Normal package (gnupg) should depend on minimal package (gnupg-gpg)
48# to ensure all tools are included. This is done only in non-native
49# builds. Native builds don't have sub-packages, so appending RDEPENDS
50# in this case breaks recipe parsing.
51RDEPENDS:${PN} += "${@ "" if ("native" in d.getVar("PN")) else (d.getVar("PN") + "-gpg")}"
52
53RRECOMMENDS:${PN} = "pinentry"
54
55do_configure:prepend () {
56 # Else these could be used in prefernce to those in aclocal-copy
57 rm -f ${S}/m4/gpg-error.m4
58 rm -f ${S}/m4/libassuan.m4
59 rm -f ${S}/m4/ksba.m4
60 rm -f ${S}/m4/libgcrypt.m4
61}
62
63do_install:append() {
64 ln -sf gpg2 ${D}${bindir}/gpg
65 ln -sf gpgv2 ${D}${bindir}/gpgv
66}
67
68do_install:append:class-native() {
69 create_wrappers ${STAGING_BINDIR_NATIVE}
70}
71
72do_install:append:class-nativesdk() {
73 create_wrappers ${SDKPATHNATIVE}${bindir_nativesdk}
74}
75
76create_wrappers() {
77 for i in gpg2 gpgconf gpg-agent gpg-connect-agent; do
78 create_wrapper ${D}${bindir}/$i GNUPG_BINDIR=$1
79 done
80}
81
82PACKAGECONFIG ??= "gnutls"
83PACKAGECONFIG[gnutls] = "--enable-gnutls, --disable-gnutls, gnutls"
84PACKAGECONFIG[sqlite3] = "--enable-sqlite, --disable-sqlite, sqlite3"
85
86BBCLASSEXTEND = "native nativesdk"
87
88lcl_maybe_fortify:mipsarch = ""
89