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. #
  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.3.2
  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:=4c60eacd7a653988a1907284de2ecf360c74f55ef9e21c40b9ebd87af6570908
  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 +PACKAGE_rtty-mbedtls:zlib)
  33. Package/rtty-nossl=$(call Package/rtty/Default,nossl)
  34. define Package/rtty-openssl/conffiles
  35. /etc/config/rtty
  36. endef
  37. Package/rtty-wolfssl/conffiles = $(Package/rtty-openssl/conffiles)
  38. Package/rtty-mbedtls/conffiles = $(Package/rtty-openssl/conffiles)
  39. Package/rtty-nossl/conffiles = $(Package/rtty-openssl/conffiles)
  40. ifeq ($(BUILD_VARIANT),openssl)
  41. CMAKE_OPTIONS += -DRTTY_USE_OPENSSL=ON
  42. else ifeq ($(BUILD_VARIANT),wolfssl)
  43. CMAKE_OPTIONS += -DRTTY_USE_WOLFSSL=ON
  44. else ifeq ($(BUILD_VARIANT),mbedtls)
  45. CMAKE_OPTIONS += -DRTTY_USE_MBEDTLS=ON
  46. else
  47. CMAKE_OPTIONS += -DRTTY_SSL_SUPPORT=OFF
  48. endif
  49. define Package/rtty-$(BUILD_VARIANT)/install
  50. $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config
  51. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/rtty $(1)/usr/sbin
  52. $(INSTALL_BIN) ./files/rtty.init $(1)/etc/init.d/rtty
  53. $(INSTALL_CONF) ./files/rtty.config $(1)/etc/config/rtty
  54. endef
  55. $(eval $(call BuildPackage,rtty-openssl))
  56. $(eval $(call BuildPackage,rtty-wolfssl))
  57. $(eval $(call BuildPackage,rtty-mbedtls))
  58. $(eval $(call BuildPackage,rtty-nossl))