Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "GNU Privacy Guard - encryption and signing tools (2.x)" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 2 | DESCRIPTION = "A complete and free implementation of the OpenPGP standard \ |
| 3 | as defined by RFC4880 (also known as PGP). GnuPG allows you to encrypt \ |
| 4 | and sign your data and communications; it features a versatile key \ |
| 5 | management system, along with access modules for all kinds of public \ |
| 6 | key directories." |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 7 | HOMEPAGE = "http://www.gnupg.org/" |
| 8 | LICENSE = "GPLv3 & LGPLv3" |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=189af8afca6d6075ba6c9e0aa8077626 \ |
| 10 | file://COPYING.LGPL3;md5=a2b6bf2cb38ee52619e60f30a1fc7257" |
| 11 | |
| 12 | DEPENDS = "npth libassuan libksba zlib bzip2 readline libgcrypt" |
| 13 | |
| 14 | inherit autotools gettext texinfo pkgconfig |
| 15 | |
| 16 | UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" |
| 17 | SRC_URI = "${GNUPG_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 18 | 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 | " |
| 23 | SRC_URI_append_class-native = " file://0001-configure.ac-use-a-custom-value-for-the-location-of-.patch \ |
| 24 | file://relocate.patch" |
| 25 | SRC_URI_append_class-nativesdk = " file://relocate.patch" |
| 26 | |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 27 | SRC_URI[sha256sum] = "c498db346a9b9a4b399e514c8f56dfc0a888ce8f327f10376ff984452cd154ec" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 28 | |
| 29 | EXTRA_OECONF = "--disable-ldap \ |
| 30 | --disable-ccid-driver \ |
| 31 | --with-zlib=${STAGING_LIBDIR}/.. \ |
| 32 | --with-bzip2=${STAGING_LIBDIR}/.. \ |
| 33 | --with-readline=${STAGING_LIBDIR}/.. \ |
| 34 | --enable-gpg-is-gpg2 \ |
| 35 | " |
| 36 | |
| 37 | # A minimal package containing just enough to run gpg+gpgagent (E.g. use gpgme in opkg) |
| 38 | PACKAGES =+ "${PN}-gpg" |
| 39 | FILES_${PN}-gpg = " \ |
| 40 | ${bindir}/gpg \ |
| 41 | ${bindir}/gpg2 \ |
| 42 | ${bindir}/gpg-agent \ |
| 43 | " |
| 44 | |
| 45 | # Normal package (gnupg) should depend on minimal package (gnupg-gpg) |
| 46 | # to ensure all tools are included. This is done only in non-native |
| 47 | # builds. Native builds don't have sub-packages, so appending RDEPENDS |
| 48 | # in this case breaks recipe parsing. |
| 49 | RDEPENDS_${PN} += "${@ "" if ("native" in d.getVar("PN")) else (d.getVar("PN") + "-gpg")}" |
| 50 | |
| 51 | RRECOMMENDS_${PN} = "pinentry" |
| 52 | |
| 53 | do_configure_prepend () { |
| 54 | # Else these could be used in prefernce to those in aclocal-copy |
| 55 | rm -f ${S}/m4/gpg-error.m4 |
| 56 | rm -f ${S}/m4/libassuan.m4 |
| 57 | rm -f ${S}/m4/ksba.m4 |
| 58 | rm -f ${S}/m4/libgcrypt.m4 |
| 59 | } |
| 60 | |
| 61 | do_install_append() { |
| 62 | ln -sf gpg2 ${D}${bindir}/gpg |
| 63 | ln -sf gpgv2 ${D}${bindir}/gpgv |
| 64 | } |
| 65 | |
| 66 | do_install_append_class-native() { |
| 67 | create_wrappers ${STAGING_BINDIR_NATIVE} |
| 68 | } |
| 69 | |
| 70 | do_install_append_class-nativesdk() { |
| 71 | create_wrappers ${SDKPATHNATIVE}${bindir_nativesdk} |
| 72 | } |
| 73 | |
| 74 | create_wrappers() { |
| 75 | for i in gpg2 gpgconf gpg-agent gpg-connect-agent; do |
| 76 | create_wrapper ${D}${bindir}/$i GNUPG_BINDIR=$1 |
| 77 | done |
| 78 | } |
| 79 | |
| 80 | PACKAGECONFIG ??= "gnutls" |
| 81 | PACKAGECONFIG[gnutls] = "--enable-gnutls, --disable-gnutls, gnutls" |
| 82 | PACKAGECONFIG[sqlite3] = "--enable-sqlite, --disable-sqlite, sqlite3" |
| 83 | |
| 84 | BBCLASSEXTEND = "native nativesdk" |