gnupg: prepare for gnupg2
authorDaniel Golle <daniel@makrotopia.org>
Tue, 20 Oct 2020 14:11:08 +0000 (15:11 +0100)
committerDaniel Golle <dangowrt@users.noreply.github.com>
Sat, 7 Nov 2020 15:51:49 +0000 (15:51 +0000)
Use ALTERNATIVES for /usr/bin/gpg and /usr/bin/gpgv, so upcoming gnupg2
variants can be selected instead.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
utils/gnupg/Makefile

index 755ee3bbc7ca3bcd9416cfc23f3cd249947a0e35..f362643e1639ab3799247f41d054f08ce48e04a8 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnupg
 PKG_VERSION:=1.4.23
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://gnupg.org/ftp/gcrypt/gnupg
@@ -35,11 +35,13 @@ endef
 define Package/gnupg
   $(call Package/gnupg/Default)
   MENU:=1
+  ALTERNATIVES:=200:/usr/bin/gpg:/usr/bin/gpg1
 endef
 
 define Package/gpgv
   $(call Package/gnupg/Default)
   TITLE:=GnuPG signature verification only
+  ALTERNATIVES:=200:/usr/bin/gpgv:/usr/bin/gpgv1
 endef
 
 define Package/gnupg-utils
@@ -89,12 +91,12 @@ TARGET_CFLAGS += $(if $(CONFIG_GCC_USE_VERSION_10),-DEXTERN_UNLESS_MAIN_MODULE=s
 
 define Package/gnupg/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpg $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpg $(1)/usr/bin/gpg1
 endef
 
 define Package/gpgv/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpgv $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gpgv $(1)/usr/bin/gpgv1
 endef
 
 define Package/gnupg-utils/install