aboutsummaryrefslogtreecommitdiff
path: root/utils/rtty
diff options
context:
space:
mode:
authorJianhui Zhao <zhaojh329@gmail.com>2020-01-31 16:31:09 +0800
committerJianhui Zhao <zhaojh329@gmail.com>2020-01-31 16:31:09 +0800
commit34e19dbb6f7c708b1843b50e9610eb95dd683d05 (patch)
tree753e523560ca40fc30ebab02606dd468924b0f08 /utils/rtty
parentd56c71b1b3dbf640b7d77d94b27da6314ec50331 (diff)
rtty: update to 7.0.1
Drop the depend of libuwsc Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
Diffstat (limited to 'utils/rtty')
-rw-r--r--utils/rtty/Makefile33
-rw-r--r--utils/rtty/files/rtty.config1
-rw-r--r--utils/rtty/files/rtty.init9
3 files changed, 25 insertions, 18 deletions
diff --git a/utils/rtty/Makefile b/utils/rtty/Makefile
index 0696f6d8c..f3aaed87d 100644
--- a/utils/rtty/Makefile
+++ b/utils/rtty/Makefile
@@ -8,21 +8,18 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=rtty
-PKG_VERSION:=6.6.1
+PKG_VERSION:=7.0.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-PKG_SOURCE_URL=https://codeload.github.com/zhaojh329/rtty/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=4a46bd80f738ccb9aeea7c0cb8aa5ac364fd964d9ccc1bc3faf7b68eae17007c
+PKG_SOURCE_URL=https://github.com/zhaojh329/rtty/releases/download/v$(PKG_VERSION)
+PKG_HASH:=e323233e3c28d215f699c047d671a94f6e775ef358d66a310df20d8d942c1a89
CMAKE_INSTALL:=1
-PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_SOURCE_SUBDIR)
-
-PKG_LICENSE:=LGPL-2.1
+PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
-PKG_MAINTAINER:=Jianhui Zhao <jianhuizhao329@gmail.com>
+PKG_MAINTAINER:=Jianhui Zhao <zhaojh329@gmail.com>
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
@@ -33,15 +30,25 @@ define Package/rtty/Default
CATEGORY:=Utilities
SUBMENU:=Terminal
URL:=https://github.com/zhaojh329/rtty
- DEPENDS:=$(2)
+ DEPENDS:=+libev $(2)
VARIANT:=$(1)
PROVIDES:=rtty
endef
-Package/rtty-openssl=$(call Package/rtty/Default,openssl,+PACKAGE_rtty-openssl:libuwsc-openssl)
-Package/rtty-wolfssl=$(call Package/rtty/Default,wolfssl,+PACKAGE_rtty-wolfssl:libuwsc-wolfssl)
-Package/rtty-mbedtls=$(call Package/rtty/Default,mbedtls,+PACKAGE_rtty-mbedtls:libuwsc-mbedtls)
-Package/rtty-nossl=$(call Package/rtty/Default,nossl,+PACKAGE_rtty-nossl:libuwsc-nossl)
+Package/rtty-openssl=$(call Package/rtty/Default,openssl,+PACKAGE_rtty-openssl:libopenssl)
+Package/rtty-wolfssl=$(call Package/rtty/Default,wolfssl,+PACKAGE_rtty-wolfssl:libwolfssl)
+Package/rtty-mbedtls=$(call Package/rtty/Default,mbedtls,+PACKAGE_rtty-mbedtls:libmbedtls)
+Package/rtty-nossl=$(call Package/rtty/Default,nossl)
+
+ifeq ($(BUILD_VARIANT),openssl)
+ CMAKE_OPTIONS += -DRTTY_USE_OPENSSL=ON
+else ifeq ($(BUILD_VARIANT),wolfssl)
+ CMAKE_OPTIONS += -DRTTY_USE_WOLFSSL=ON
+else ifeq ($(BUILD_VARIANT),mbedtls)
+ CMAKE_OPTIONS += -DRTTY_USE_MBEDTLS=ON
+else
+ CMAKE_OPTIONS += -DRTTY_SSL_SUPPORT=OFF
+endif
define Package/rtty-$(BUILD_VARIANT)/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d $(1)/etc/config
diff --git a/utils/rtty/files/rtty.config b/utils/rtty/files/rtty.config
index 65138e631..4b9cf51bf 100644
--- a/utils/rtty/files/rtty.config
+++ b/utils/rtty/files/rtty.config
@@ -10,5 +10,4 @@
# option host 'your-server-host' # Server host
# option port '5912' # Server Port
# option ssl 1 # Whether to use ssl
-# option keepalive 5 # keep alive in seconds for this client
# option token 'your-token' # generated by rttys
diff --git a/utils/rtty/files/rtty.init b/utils/rtty/files/rtty.init
index 55a131053..297f393c2 100644
--- a/utils/rtty/files/rtty.init
+++ b/utils/rtty/files/rtty.init
@@ -13,7 +13,6 @@ validate_rtty_section() {
'host:host' \
'port:port' \
'ssl:bool:0' \
- 'keepalive:uinteger:5' \
'token:maxlength(32)'
}
@@ -44,10 +43,12 @@ start_rtty() {
return 1
}
+ [ -z "$id" ] && {
+ id=$(cat /sys/class/net/$ifname/address | sed 's/://g' | tr 'a-z' 'A-Z')
+ }
+
procd_open_instance
- procd_set_param command $BIN -h $host -p $port -a -k $keepalive
- [ -n "$ifname" ] && procd_append_param command -i "$ifname"
- [ -n "$id" ] && procd_append_param command -I "$id"
+ procd_set_param command $BIN -h $host -p $port -I "$id" -a
[ -n "$description" ] && procd_append_param command -d "$description"
[ "$ssl" = "1" ] && procd_append_param command -s
[ -n "$token" ] && procd_append_param command -t "$token"