blob: 411ea9579dd354fa03ce9592a51b5866982afbd0 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "GNU Privacy Guard - encryption and signing tools (2.x)"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06002DESCRIPTION = "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."
Andrew Geissler82c905d2020-04-13 13:39:40 -05007HOMEPAGE = "http://www.gnupg.org/"
8LICENSE = "GPLv3 & LGPLv3"
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 \
Andrew Geissler82c905d2020-04-13 13:39:40 -050018 file://0002-use-pkgconfig-instead-of-npth-config.patch \
19 file://0003-dirmngr-uses-libgpg-error.patch \
20 file://0004-autogen.sh-fix-find-version-for-beta-checking.patch \
21 file://0001-Woverride-init-is-not-needed-with-gcc-9.patch \
22 "
Patrick Williams213cb262021-08-07 19:21:33 -050023SRC_URI:append:class-native = " file://0001-configure.ac-use-a-custom-value-for-the-location-of-.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050024 file://relocate.patch"
Patrick Williams213cb262021-08-07 19:21:33 -050025SRC_URI:append:class-nativesdk = " file://relocate.patch"
Andrew Geissler82c905d2020-04-13 13:39:40 -050026
William A. Kennington IIIac69b482021-06-02 12:28:27 -070027SRC_URI[sha256sum] = "c498db346a9b9a4b399e514c8f56dfc0a888ce8f327f10376ff984452cd154ec"
Andrew Geissler82c905d2020-04-13 13:39:40 -050028
29EXTRA_OECONF = "--disable-ldap \
30 --disable-ccid-driver \
31 --with-zlib=${STAGING_LIBDIR}/.. \
32 --with-bzip2=${STAGING_LIBDIR}/.. \
33 --with-readline=${STAGING_LIBDIR}/.. \
Patrick Williams93c203f2021-10-06 16:15:23 -050034 --with-mailprog=${sbindir}/sendmail \
Andrew Geissler82c905d2020-04-13 13:39:40 -050035 --enable-gpg-is-gpg2 \
36 "
37
38# A minimal package containing just enough to run gpg+gpgagent (E.g. use gpgme in opkg)
39PACKAGES =+ "${PN}-gpg"
Patrick Williams213cb262021-08-07 19:21:33 -050040FILES:${PN}-gpg = " \
Andrew Geissler82c905d2020-04-13 13:39:40 -050041 ${bindir}/gpg \
42 ${bindir}/gpg2 \
43 ${bindir}/gpg-agent \
44"
45
46# Normal package (gnupg) should depend on minimal package (gnupg-gpg)
47# to ensure all tools are included. This is done only in non-native
48# builds. Native builds don't have sub-packages, so appending RDEPENDS
49# in this case breaks recipe parsing.
Patrick Williams213cb262021-08-07 19:21:33 -050050RDEPENDS:${PN} += "${@ "" if ("native" in d.getVar("PN")) else (d.getVar("PN") + "-gpg")}"
Andrew Geissler82c905d2020-04-13 13:39:40 -050051
Patrick Williams213cb262021-08-07 19:21:33 -050052RRECOMMENDS:${PN} = "pinentry"
Andrew Geissler82c905d2020-04-13 13:39:40 -050053
Patrick Williams213cb262021-08-07 19:21:33 -050054do_configure:prepend () {
Andrew Geissler82c905d2020-04-13 13:39:40 -050055 # Else these could be used in prefernce to those in aclocal-copy
56 rm -f ${S}/m4/gpg-error.m4
57 rm -f ${S}/m4/libassuan.m4
58 rm -f ${S}/m4/ksba.m4
59 rm -f ${S}/m4/libgcrypt.m4
60}
61
Patrick Williams213cb262021-08-07 19:21:33 -050062do_install:append() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050063 ln -sf gpg2 ${D}${bindir}/gpg
64 ln -sf gpgv2 ${D}${bindir}/gpgv
65}
66
Patrick Williams213cb262021-08-07 19:21:33 -050067do_install:append:class-native() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050068 create_wrappers ${STAGING_BINDIR_NATIVE}
69}
70
Patrick Williams213cb262021-08-07 19:21:33 -050071do_install:append:class-nativesdk() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050072 create_wrappers ${SDKPATHNATIVE}${bindir_nativesdk}
73}
74
75create_wrappers() {
76 for i in gpg2 gpgconf gpg-agent gpg-connect-agent; do
77 create_wrapper ${D}${bindir}/$i GNUPG_BINDIR=$1
78 done
79}
80
81PACKAGECONFIG ??= "gnutls"
82PACKAGECONFIG[gnutls] = "--enable-gnutls, --disable-gnutls, gnutls"
83PACKAGECONFIG[sqlite3] = "--enable-sqlite, --disable-sqlite, sqlite3"
84
85BBCLASSEXTEND = "native nativesdk"