Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1 | SUMMARY = "GNU Privacy Guard - encryption and signing tools (2.x)" |
| 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." |
| 7 | HOMEPAGE = "http://www.gnupg.org/" |
| 8 | LICENSE = "GPL-3.0-only & LGPL-3.0-only" |
| 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 \ |
| 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 \ |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 21 | file://fix-ldap.patch \ |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 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 | |
Andrew Geissler | 5082cc7 | 2023-09-11 08:41:39 -0400 | [diff] [blame] | 27 | SRC_URI[sha256sum] = "a271ae6d732f6f4d80c258ad9ee88dd9c94c8fdc33c3e45328c4d7c126bd219d" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [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 | --with-mailprog=${sbindir}/sendmail \ |
| 35 | --enable-gpg-is-gpg2 \ |
| 36 | " |
Patrick Williams | 2a25492 | 2023-08-11 09:48:11 -0500 | [diff] [blame] | 37 | # yat2m can be found from recipe-sysroot-native non-deterministically with different versioning otherwise |
| 38 | CACHED_CONFIGUREVARS += "ac_cv_path_YAT2M=./yat2m" |
Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 39 | |
| 40 | # A minimal package containing just enough to run gpg+gpgagent (E.g. use gpgme in opkg) |
| 41 | PACKAGES =+ "${PN}-gpg" |
| 42 | FILES:${PN}-gpg = " \ |
| 43 | ${bindir}/gpg \ |
| 44 | ${bindir}/gpg2 \ |
| 45 | ${bindir}/gpg-agent \ |
| 46 | " |
| 47 | |
| 48 | # Normal package (gnupg) should depend on minimal package (gnupg-gpg) |
| 49 | # to ensure all tools are included. This is done only in non-native |
| 50 | # builds. Native builds don't have sub-packages, so appending RDEPENDS |
| 51 | # in this case breaks recipe parsing. |
| 52 | RDEPENDS:${PN} += "${@ "" if ("native" in d.getVar("PN")) else (d.getVar("PN") + "-gpg")}" |
| 53 | |
| 54 | RRECOMMENDS:${PN} = "pinentry" |
| 55 | |
| 56 | do_configure:prepend () { |
| 57 | # Else these could be used in prefernce to those in aclocal-copy |
| 58 | rm -f ${S}/m4/gpg-error.m4 |
| 59 | rm -f ${S}/m4/libassuan.m4 |
| 60 | rm -f ${S}/m4/ksba.m4 |
| 61 | rm -f ${S}/m4/libgcrypt.m4 |
| 62 | } |
| 63 | |
| 64 | do_install:append() { |
| 65 | ln -sf gpg2 ${D}${bindir}/gpg |
| 66 | ln -sf gpgv2 ${D}${bindir}/gpgv |
| 67 | } |
| 68 | |
| 69 | do_install:append:class-native() { |
| 70 | create_wrappers ${STAGING_BINDIR_NATIVE} |
| 71 | } |
| 72 | |
| 73 | do_install:append:class-nativesdk() { |
| 74 | create_wrappers ${SDKPATHNATIVE}${bindir_nativesdk} |
| 75 | } |
| 76 | |
| 77 | create_wrappers() { |
| 78 | for i in gpg2 gpgconf gpg-agent gpg-connect-agent; do |
| 79 | create_wrapper ${D}${bindir}/$i GNUPG_BINDIR=$1 |
| 80 | done |
| 81 | } |
| 82 | |
| 83 | PACKAGECONFIG ??= "gnutls" |
| 84 | PACKAGECONFIG[gnutls] = "--enable-gnutls, --disable-gnutls, gnutls" |
| 85 | PACKAGECONFIG[sqlite3] = "--enable-sqlite, --disable-sqlite, sqlite3" |
| 86 | |
| 87 | BBCLASSEXTEND = "native nativesdk" |
| 88 | |
| 89 | lcl_maybe_fortify:mipsarch = "" |
| 90 | |