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.

69 lines
2.1 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.4.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:=997e5a3f0b1ce5e06d8505691ea0a9a3fd8af972f6d1b4b04f42dd03f392649f
  14. PKG_MAINTAINER:=Jianhui Zhao <zhaojh329@gmail.com>
  15. PKG_LICENSE:=MIT
  16. PKG_LICENSE_FILES:=LICENSE
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/cmake.mk
  19. define Package/rtty/Default
  20. TITLE:=Access your terminals from anywhere via the web
  21. SECTION:=utils
  22. CATEGORY:=Utilities
  23. SUBMENU:=Terminal
  24. URL:=https://github.com/zhaojh329/rtty
  25. DEPENDS:=+libev $(2)
  26. VARIANT:=$(1)
  27. PROVIDES:=rtty
  28. endef
  29. Package/rtty-openssl=$(call Package/rtty/Default,openssl,+PACKAGE_rtty-openssl:libopenssl)
  30. Package/rtty-wolfssl=$(call Package/rtty/Default,wolfssl,+PACKAGE_rtty-wolfssl:libwolfssl)
  31. Package/rtty-mbedtls=$(call Package/rtty/Default,mbedtls,+PACKAGE_rtty-mbedtls:libmbedtls +PACKAGE_rtty-mbedtls:zlib)
  32. Package/rtty-nossl=$(call Package/rtty/Default,nossl)
  33. define Package/rtty-openssl/conffiles
  34. /etc/config/rtty
  35. endef
  36. Package/rtty-wolfssl/conffiles = $(Package/rtty-openssl/conffiles)
  37. Package/rtty-mbedtls/conffiles = $(Package/rtty-openssl/conffiles)
  38. Package/rtty-nossl/conffiles = $(Package/rtty-openssl/conffiles)
  39. ifeq ($(BUILD_VARIANT),openssl)
  40. CMAKE_OPTIONS += -DUSE_OPENSSL=ON
  41. else ifeq ($(BUILD_VARIANT),wolfssl)
  42. CMAKE_OPTIONS += -DUSE_WOLFSSL=ON
  43. else ifeq ($(BUILD_VARIANT),mbedtls)
  44. CMAKE_OPTIONS += -DUSE_MBEDTLS=ON
  45. else
  46. CMAKE_OPTIONS += -DSSL_SUPPORT=OFF
  47. endif
  48. define Package/rtty-$(BUILD_VARIANT)/install
  49. $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config
  50. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/rtty $(1)/usr/sbin
  51. $(INSTALL_BIN) ./files/rtty.init $(1)/etc/init.d/rtty
  52. $(INSTALL_CONF) ./files/rtty.config $(1)/etc/config/rtty
  53. endef
  54. $(eval $(call BuildPackage,rtty-openssl))
  55. $(eval $(call BuildPackage,rtty-wolfssl))
  56. $(eval $(call BuildPackage,rtty-mbedtls))
  57. $(eval $(call BuildPackage,rtty-nossl))