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.

71 lines
2.2 KiB

  1. # Copyright (C) 2019 Eneas Ulir de Queiroz <cotequeiroz@gmail.com>
  2. #
  3. # This is free software, licensed under the GNU General Public License v2.
  4. # See /LICENSE for more information.
  5. #
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=afalg_engine
  8. PKG_VERSION:=1.2.0-beta.1
  9. PKG_RELEASE:=1
  10. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  11. PKG_SOURCE_URL:=https://github.com/cotequeiroz/afalg_engine/archive/v$(PKG_VERSION)
  12. PKG_HASH:=6f0da98a3c12eaf50331ac7cd81f7b8800abf54b96fd73bd3e37cc50fd3d2ba8
  13. PKG_MAINTAINER:=Eneas U de Queiroz <cotequeiroz@gmail.com>
  14. PKG_LICENSE:=Apache-2.0
  15. PKG_LICENSE_FILES:=LICENSE
  16. PKG_CONFIG_DEPENDS:= \
  17. CONFIG_AFALG_DIGESTS \
  18. CONFIG_AFALG_FALLBACK \
  19. CONFIG_AFALG_UPDATE_CTR_IV \
  20. CONFIG_AFALG_ZERO_COPY
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/cmake.mk
  23. ENGINES_DIR:=engines-1.1
  24. define Package/libopenssl-afalg_sync
  25. SECTION:=libs
  26. CATEGORY:=Libraries
  27. SUBMENU:=SSL
  28. MDEPENDS:=libopenssl
  29. TITLE:=AF_ALG engine using sync crypto API
  30. URL:=https://github.com/cotequeiroz/afalg_engine
  31. DEPENDS:=libopenssl @OPENSSL_ENGINE @!OPENSSL_ENGINE_BUILTIN_AFALG \
  32. +libopenssl-conf +kmod-crypto-user
  33. CONFLICTS:=libopenssl-afalg $(if $(CONFIG_AFALG_FALLBACK),libopenssl-devcrypto)
  34. MENU:=1
  35. endef
  36. define Package/libopenssl-afalg_sync/description
  37. This is an alternate AF_ALG engine for openssl, based on the devcrypto
  38. engine, but using the AF_ALG interface instead of /dev/crypto
  39. It is different than the AF_ALG engine that ships with OpenSSL:
  40. - it is faster
  41. - it uses sync calls, instead of async
  42. - it suports more algorithms
  43. endef
  44. define Package/libopenssl-afalg_sync/config
  45. source "$(SOURCE)/Config.in"
  46. endef
  47. CMAKE_OPTIONS += \
  48. -DOPENSSL_ENGINES_DIR=/usr/lib/$(ENGINES_DIR) \
  49. -DDIGESTS=$(if $(CONFIG_AFALG_DIGESTS),ON,OFF) \
  50. -DFALLBACK=$(if $(CONFIG_AFALG_FALLBACK),ON,OFF) \
  51. -DUPDATE_CTR_IV=$(if $(CONFIG_AFALG_UPDATE_CTR_IV),ON,OFF) \
  52. -DUSE_ZERO_COPY=$(if $(CONFIG_AFALG_ZERO_COPY),ON,OFF)
  53. define Package/libopenssl-afalg_sync/install
  54. $(INSTALL_DIR) $(1)/usr/lib/$(ENGINES_DIR)
  55. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/afalg.so \
  56. $(1)/usr/lib/$(ENGINES_DIR)/
  57. endef
  58. $(eval $(call BuildPackage,libopenssl-afalg_sync))