You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

142 lines
4.7 KiB

  1. #
  2. # Copyright (C) 2006-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=gnupg
  9. PKG_VERSION:=2.2.23
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=https://gnupg.org/ftp/gcrypt/gnupg
  13. PKG_HASH:=10b55e49d78b3e49f1edb58d7541ecbdad92ddaeeb885b6f486ed23d1cd1da5c
  14. PKG_LICENSE:=GPL-3.0-or-later
  15. PKG_LICENSE_FILES:=COPYING COPYING.CC0 COPYING.GPL2 COPYING.LGPL21 COPYING.LGPL3 COPYING.other
  16. PKG_INSTALL:=1
  17. PKG_BUILD_PARALLEL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/nls.mk
  20. define Package/gnupg2/Default
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. SUBMENU:=Encryption
  24. DEPENDS:=+libgpg-error +libnpth +libassuan +libksba +libgcrypt +zlib +libncurses +libreadline $(ICONV_DEPENDS) $(INTL_DEPENDS)
  25. TITLE:=GNU privacy guard (version 2) - a free PGP replacement
  26. URL:=http://www.gnupg.org/
  27. endef
  28. define Package/gnupg2
  29. $(call Package/gnupg2/Default)
  30. MENU:=1
  31. ALTERNATIVES:=300:/usr/bin/gpg:/usr/bin/gpg2
  32. endef
  33. define Package/gpgv2
  34. $(call Package/gnupg2/Default)
  35. TITLE:=GnuPG signature verification only (version 2)
  36. ALTERNATIVES:=300:/usr/bin/gpgv:/usr/bin/gpgv2
  37. endef
  38. define Package/gnupg2-dirmngr
  39. $(call Package/gnupg2/Default)
  40. TITLE:=Keyserver, CRL, and OCSP access for GnuPG (version 2)
  41. endef
  42. define Package/gnupg2-utils
  43. $(call Package/gnupg2/Default)
  44. DEPENDS:=gnupg2 +libcurl
  45. TITLE:=Key management utilities for GnuPG (version 2)
  46. endef
  47. define Package/gnupg2/description
  48. GnuPG is a complete and free implementation of the OpenPGP standard as
  49. defined by RFC4880 (also known as PGP). GnuPG allows you to encrypt and
  50. sign your data and communications; it features a versatile key
  51. management system, along with access modules for all kinds of public
  52. key directories. GnuPG, also known as GPG, is a command line tool with
  53. features for easy integration with other applications. A wealth of
  54. frontend applications and libraries are available. GnuPG also provides
  55. support for S/MIME and Secure Shell (ssh).
  56. endef
  57. define Package/gpgv2/description
  58. GPGv is a stripped down version of GnuPG that only checks signatures.
  59. endef
  60. define Package/gnupg2-dirmngr/description
  61. Since version 2.1 of GnuPG, 'dirmngr' takes care of accessing the
  62. OpenPGP keyservers. As with previous versions it is also used as a
  63. server for managing and downloading certificate revocation lists (CRLs)
  64. for X.509 certificates, downloading X.509 certificates, and providing
  65. access to OCSP providers. Dirmngr is invoked internally by 'gpg',
  66. 'gpgsm', or via the 'gpg-connect-agent' tool.
  67. endef
  68. define Package/gnupg2-utils/description
  69. Key management utilies for GnuPG (version 2).
  70. This package is needed to import keys from a keyserver.
  71. endef
  72. CONFIGURE_ARGS += \
  73. --with-gpg-error-prefix="$(STAGING_DIR)/usr/" \
  74. --with-libgcrypt-prefix="$(STAGING_DIR)/usr/" \
  75. --with-libassuan-prefix="$(STAGING_DIR)/usr/" \
  76. --with-ksba-prefix="$(STAGING_DIR)/usr/" \
  77. --with-npth-prefix="$(STAGING_DIR)/usr/" \
  78. --enable-dirmngr \
  79. --disable-bzip2 \
  80. --disable-card-support \
  81. --disable-ccid-driver \
  82. --disable-gnutls \
  83. --disable-ldap \
  84. --disable-ntbtls \
  85. --disable-rpath \
  86. --disable-sqlite \
  87. --disable-tests \
  88. --disable-zip
  89. TARGET_CFLAGS += $(if $(CONFIG_GCC_USE_VERSION_10),-DEXTERN_UNLESS_MAIN_MODULE=static)
  90. define Package/gnupg2/install
  91. $(INSTALL_DIR) $(1)/usr/bin
  92. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpg $(1)/usr/bin/gpg2
  93. endef
  94. define Package/gpgv2/install
  95. $(INSTALL_DIR) $(1)/usr/bin
  96. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpgv $(1)/usr/bin/gpgv2
  97. endef
  98. define Package/gnupg2-dirmngr/install
  99. $(INSTALL_DIR) $(1)/usr/bin
  100. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dirmngr $(1)/usr/bin/dirmngr
  101. endef
  102. define Package/gnupg2-utils/install
  103. $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/sbin
  104. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpgtar $(1)/usr/bin
  105. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/kbxutil $(1)/usr/bin
  106. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpg-wks-server $(1)/usr/bin
  107. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpg-agent $(1)/usr/bin
  108. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpg-connect-agent $(1)/usr/bin
  109. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpgsplit $(1)/usr/bin
  110. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpgparsemail $(1)/usr/bin
  111. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpgsm $(1)/usr/bin
  112. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/addgnupghome $(1)/usr/sbin
  113. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/applygnupgdefaults $(1)/usr/sbin
  114. $(INSTALL_DIR) $(1)/usr/lib
  115. $(CP) $(PKG_INSTALL_DIR)/usr/lib/gpg-* $(1)/usr/lib
  116. endef
  117. $(eval $(call BuildPackage,gnupg2))
  118. $(eval $(call BuildPackage,gpgv2))
  119. $(eval $(call BuildPackage,gnupg2-dirmngr))
  120. $(eval $(call BuildPackage,gnupg2-utils))