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.

67 lines
2.1 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.1.0
  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:=0c0304558e9450752656522a8f9036130f4e745c4818f02f92cb8d6c99357ed6
  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:= CONFIG_AFALG_ZERO_COPY
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/cmake.mk
  19. ENGINES_DIR:=engines-1.1
  20. define Package/libopenssl-afalg_sync
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. SUBMENU:=SSL
  24. MDEPENDS:=libopenssl
  25. TITLE:=AF_ALG engine using sync crypto API
  26. URL:=https://github.com/cotequeiroz/afalg_engine
  27. DEPENDS:=libopenssl @OPENSSL_ENGINE @!OPENSSL_ENGINE_BUILTIN_AFALG \
  28. +libopenssl-conf +kmod-crypto-user
  29. CONFLICTS:=libopenssl-afalg
  30. endef
  31. define Package/libopenssl-afalg_sync/description
  32. This is an alternate AF_ALG engine for openssl, based on the devcrypto
  33. engine, but using the AF_ALG interface instead of /dev/crypto
  34. It is different than the AF_ALG engine that ships with OpenSSL:
  35. - it uses sync calls, instead of async
  36. - it suports more algorithms
  37. endef
  38. define Package/libopenssl-afalg_sync/config
  39. config AFALG_ZERO_COPY
  40. depends on PACKAGE_libopenssl-afalg_sync
  41. bool "Use Zero-Copy Mode"
  42. help
  43. Uses a Zero-Copy interface. Even though it is supposed to improve
  44. performance, actual measurements indicate otherwise.
  45. endef
  46. CMAKE_OPTIONS += \
  47. -DOPENSSL_ENGINES_DIR=/usr/lib/$(ENGINES_DIR) \
  48. -DUSE_ZERO_COPY=$(if $(CONFIG_AFALG_ZERO_COPY),ON,OFF)
  49. define Package/libopenssl-afalg_sync/install
  50. $(INSTALL_DIR) $(1)/usr/lib/$(ENGINES_DIR)
  51. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/afalg.so \
  52. $(1)/usr/lib/$(ENGINES_DIR)/
  53. endef
  54. $(eval $(call BuildPackage,libopenssl-afalg_sync))