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.

79 lines
2.1 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=gost_engine
  3. PKG_VERSION:=1.1.0.3
  4. PKG_RELEASE:=$(AUTORELEASE)
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=https://github.com/gost-engine/engine/archive/v$(PKG_VERSION)
  7. PKG_HASH:=fff725052e82c9adb5b738729b30141f61ac91fa457a4f4b5de18b8b24092f75
  8. PKG_MAINTAINER:=Artur Petrov <github@phpchain.ru>
  9. PKG_LICENSE:=OpenSSL
  10. include $(INCLUDE_DIR)/package.mk
  11. include $(INCLUDE_DIR)/cmake.mk
  12. PKG_UNPACK:=$(HOST_TAR) -C "$(PKG_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(PKG_SOURCE)"
  13. PKG_INSTALL:=
  14. ENGINES_DIR:=engines-1.1
  15. define Package/gost_engine/Default
  16. TITLE:=GOST engine for OpenSSL
  17. URL:=http://www.openssl.org/
  18. SECTION:=libs
  19. CATEGORY:=Libraries
  20. endef
  21. define Package/gost_engine/Default/description
  22. Russian GOST crypto algorithms for OpenSSL.
  23. endef
  24. define Package/libopenssl-gost_engine
  25. $(call Package/gost_engine/Default)
  26. SUBMENU:=SSL
  27. TITLE+= (library)
  28. URL:=https://github.com/gost-engine/engine/
  29. DEPENDS:=libopenssl @OPENSSL_ENGINE @OPENSSL_WITH_GOST +libopenssl-conf
  30. endef
  31. define Package/libopenssl-gost_engine/description
  32. $(call Package/gost_engine/Default/description)
  33. This package contains the GOST engine library.
  34. Support ciphers:
  35. GOST2012-GOST8912-GOST8912
  36. GOST2001-GOST89-GOST89
  37. endef
  38. define Package/gost_engine-util
  39. $(call Package/gost_engine/Default)
  40. SECTION:=utils
  41. CATEGORY:=Utilities
  42. DEPENDS:=libopenssl-gost_engine
  43. TITLE+= (utilities)
  44. endef
  45. define Package/gost_engine-util/description
  46. $(call Package/gost_engine/Default/description)
  47. This package contains the GOST engine command-line utilities gostsum and gost12sum.
  48. endef
  49. CMAKE_OPTIONS += -DOPENSSL_ENGINES_DIR=/usr/lib/$(ENGINES_DIR)
  50. define Package/libopenssl-gost_engine/install
  51. $(INSTALL_DIR) $(1)/usr/lib/$(ENGINES_DIR)
  52. $(INSTALL_DATA) $(PKG_BUILD_DIR)/bin/gost.so \
  53. $(1)/usr/lib/$(ENGINES_DIR)/
  54. endef
  55. define Package/gost_engine-util/install
  56. $(INSTALL_DIR) $(1)/usr/bin
  57. $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/{gost12sum,gostsum} \
  58. $(1)/usr/bin/
  59. endef
  60. $(eval $(call BuildPackage,libopenssl-gost_engine))
  61. $(eval $(call BuildPackage,gost_engine-util))