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.

63 lines
1.9 KiB

  1. #
  2. # Copyright (C) 2018 Jianhui Zhao
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=rtty
  9. PKG_VERSION:=7.0.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL=https://github.com/zhaojh329/rtty/releases/download/v$(PKG_VERSION)
  13. PKG_HASH:=e323233e3c28d215f699c047d671a94f6e775ef358d66a310df20d8d942c1a89
  14. CMAKE_INSTALL:=1
  15. PKG_LICENSE:=MIT
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_MAINTAINER:=Jianhui Zhao <zhaojh329@gmail.com>
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/cmake.mk
  20. define Package/rtty/Default
  21. TITLE:=Access your terminals from anywhere via the web
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. SUBMENU:=Terminal
  25. URL:=https://github.com/zhaojh329/rtty
  26. DEPENDS:=+libev $(2)
  27. VARIANT:=$(1)
  28. PROVIDES:=rtty
  29. endef
  30. Package/rtty-openssl=$(call Package/rtty/Default,openssl,+PACKAGE_rtty-openssl:libopenssl)
  31. Package/rtty-wolfssl=$(call Package/rtty/Default,wolfssl,+PACKAGE_rtty-wolfssl:libwolfssl)
  32. Package/rtty-mbedtls=$(call Package/rtty/Default,mbedtls,+PACKAGE_rtty-mbedtls:libmbedtls)
  33. Package/rtty-nossl=$(call Package/rtty/Default,nossl)
  34. ifeq ($(BUILD_VARIANT),openssl)
  35. CMAKE_OPTIONS += -DRTTY_USE_OPENSSL=ON
  36. else ifeq ($(BUILD_VARIANT),wolfssl)
  37. CMAKE_OPTIONS += -DRTTY_USE_WOLFSSL=ON
  38. else ifeq ($(BUILD_VARIANT),mbedtls)
  39. CMAKE_OPTIONS += -DRTTY_USE_MBEDTLS=ON
  40. else
  41. CMAKE_OPTIONS += -DRTTY_SSL_SUPPORT=OFF
  42. endif
  43. define Package/rtty-$(BUILD_VARIANT)/install
  44. $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config
  45. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/rtty $(1)/usr/sbin
  46. $(INSTALL_BIN) ./files/rtty.init $(1)/etc/init.d/rtty
  47. $(INSTALL_CONF) ./files/rtty.config $(1)/etc/config/rtty
  48. endef
  49. $(eval $(call BuildPackage,rtty-openssl))
  50. $(eval $(call BuildPackage,rtty-wolfssl))
  51. $(eval $(call BuildPackage,rtty-mbedtls))
  52. $(eval $(call BuildPackage,rtty-nossl))