openssl: move engine.mk to INCLUDE_DIR
authorEneas U de Queiroz <cotequeiroz@gmail.com>
Tue, 22 Mar 2022 17:03:30 +0000 (14:03 -0300)
committerPaul Spooren <mail@aparcar.org>
Wed, 23 Mar 2022 23:13:51 +0000 (23:13 +0000)
engine.mk is supposed to be included by engine packages, but it will not
be present in the SDK in the same place as in the main repository.

Move it to include/openssl-engine.mk to avoid this.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
include/openssl-engine.mk [new file with mode: 0644]
package/libs/openssl/Makefile
package/libs/openssl/engine.mk [deleted file]

diff --git a/include/openssl-engine.mk b/include/openssl-engine.mk
new file mode 100644 (file)
index 0000000..d8baba4
--- /dev/null
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Copyright (C) 2022 EnĂ©as Ulir de Queiroz
+
+ENGINES_DIR=engines-1.1
+
+define Package/openssl/engine/Default
+  SECTION:=libs
+  CATEGORY:=Libraries
+  SUBMENU:=SSL
+  DEPENDS:=libopenssl @OPENSSL_ENGINE +libopenssl-conf
+endef
+
+# 1 = engine name
+# 2 - package name, defaults to libopenssl-$(1)
+define Package/openssl/add-engine
+  OSSL_ENG_PKG:=$(if $(2),$(2),libopenssl-$(1))
+  Package/$$(OSSL_ENG_PKG)/conffiles:=/etc/ssl/engines.cnf.d/$(1).cnf
+
+  define Package/$$(OSSL_ENG_PKG)/install
+       $$(INSTALL_DIR)  $$(1)/usr/lib/$(ENGINES_DIR)
+       $$(INSTALL_BIN)  $$(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/$(1).so \
+                        $$(1)/usr/lib/$(ENGINES_DIR)
+       $$(INSTALL_DIR)  $$(1)/etc/ssl/engines.cnf.d
+       $$(INSTALL_DATA) ./files/$(1).cnf $$(1)/etc/ssl/engines.cnf.d/
+  endef
+
+  define Package/$$(OSSL_ENG_PKG)/postinst :=
+#!/bin/sh
+OPENSSL_UCI="$$$${IPKG_INSTROOT}/etc/config/openssl"
+
+[ -z "$$$${IPKG_INSTROOT}" ] && uci -q get openssl.$(1) >/dev/null && exit 0
+
+cat << EOF >> "$$$${OPENSSL_UCI}"
+
+config engine '$(1)'
+       option enabled '1'
+EOF
+
+[ -n "$$$${IPKG_INSTROOT}" ] || /etc/init.d/openssl reload
+  endef
+
+  define Package/$$(OSSL_ENG_PKG)/postrm :=
+#!/bin/sh
+[ -n "$$$${IPKG_INSTROOT}" ] && exit 0
+uci delete openssl.$(1)
+uci commit openssl
+/etc/init.d/openssl reload
+  endef
+endef
index b50620118a2ed6d7b4f075af591a7b6af17cf11b..b771edfc84cbfcfab517bd12e7fbe30fe51ceb71 100644 (file)
@@ -11,7 +11,7 @@ PKG_NAME:=openssl
 PKG_BASE:=1.1.1
 PKG_BUGFIX:=n
 PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX)
-PKG_RELEASE:=1
+PKG_RELEASE:=$(AUTORELEASE)
 PKG_USE_MIPS16:=0
 
 PKG_BUILD_PARALLEL:=1
@@ -64,7 +64,7 @@ PKG_CONFIG_DEPENDS:= \
        CONFIG_OPENSSL_WITH_WHIRLPOOL
 
 include $(INCLUDE_DIR)/package.mk
-include engine.mk
+include $(INCLUDE_DIR)/openssl-engine.mk
 
 ifneq ($(CONFIG_CCACHE),)
 HOSTCC=$(HOSTCC_NOCACHE)
diff --git a/package/libs/openssl/engine.mk b/package/libs/openssl/engine.mk
deleted file mode 100644 (file)
index 973a989..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-ENGINES_DIR=engines-1.1
-
-define Package/openssl/engine/Default
-  SECTION:=libs
-  CATEGORY:=Libraries
-  SUBMENU:=SSL
-  DEPENDS:=libopenssl @OPENSSL_ENGINE +libopenssl-conf
-endef
-
-# 1 = engine name
-# 2 - package name, defaults to libopenssl-$(1)
-define Package/openssl/add-engine
-  OSSL_ENG_PKG:=$(if $(2),$(2),libopenssl-$(1))
-  Package/$$(OSSL_ENG_PKG)/conffiles:=/etc/ssl/engines.cnf.d/$(1).cnf
-
-  define Package/$$(OSSL_ENG_PKG)/install
-       $$(INSTALL_DIR)  $$(1)/usr/lib/$(ENGINES_DIR)
-       $$(INSTALL_BIN)  $$(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/$(1).so \
-                        $$(1)/usr/lib/$(ENGINES_DIR)
-       $$(INSTALL_DIR)  $$(1)/etc/ssl/engines.cnf.d
-       $$(INSTALL_DATA) ./files/$(1).cnf $$(1)/etc/ssl/engines.cnf.d/
-  endef
-
-  define Package/$$(OSSL_ENG_PKG)/postinst :=
-#!/bin/sh
-OPENSSL_UCI="$$$${IPKG_INSTROOT}/etc/config/openssl"
-
-[ -z "$$$${IPKG_INSTROOT}" ] && uci -q get openssl.$(1) >/dev/null && exit 0
-
-cat << EOF >> "$$$${OPENSSL_UCI}"
-
-config engine '$(1)'
-       option enabled '1'
-EOF
-
-[ -n "$$$${IPKG_INSTROOT}" ] || /etc/init.d/openssl reload
-  endef
-
-  define Package/$$(OSSL_ENG_PKG)/postrm :=
-#!/bin/sh
-[ -n "$$$${IPKG_INSTROOT}" ] && exit 0
-uci delete openssl.$(1)
-uci commit openssl
-/etc/init.d/openssl reload
-  endef
-endef