Skip to content

Commit

Permalink
ttyd: upgrade to 1.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
tsl0922 committed Oct 12, 2023
1 parent 952715d commit 3117969
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 37 deletions.
1 change: 0 additions & 1 deletion trunk/user/ttyd/.gitignore

This file was deleted.

47 changes: 12 additions & 35 deletions trunk/user/ttyd/Makefile
Original file line number Diff line number Diff line change
@@ -1,41 +1,18 @@
SRC_NAME=ttyd-1.7.3
SRC_URL=https://github.com/tsl0922/ttyd/archive/1.7.3.tar.gz
include $(ROOTDIR)/rules.mk

THISDIR = $(shell pwd)
PKG_NAME:=ttyd
PKG_VERSION:=1.7.4

CFLAGS += -fno-unwind-tables -fno-asynchronous-unwind-tables
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/tsl0922/ttyd/tar.gz/$(PKG_VERSION)?
PKG_HASH:=300d8cef4b0b32b0ec30d7bf4d3721a5d180e22607f9467a95ab7b6d9652ca9b

all: download_test extract_test config_test
$(MAKE) -j$(HOST_NCPU) -C $(SRC_NAME)/build
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk

download_test:
( if [ ! -f $(THISDIR)/$(SRC_NAME).tar.gz ]; then \
wget -t5 --timeout=20 --no-check-certificate -O $(SRC_NAME).tar.gz $(SRC_URL); \
fi )

extract_test:
( if [ ! -d $(THISDIR)/$(SRC_NAME) ]; then \
tar zxf $(SRC_NAME).tar.gz; \
fi )

config_test:
( if [ -f ./config_done ]; then \
echo "the same configuration"; \
else \
make configure && touch config_done; \
fi )

configure:
( mkdir -p $(SRC_NAME)/build && cd $(SRC_NAME)/build ; \
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=$(CONFIG_CMAKE_TOOLCHAIN_FILE) \
.. \
)

clean:
rm -rf $(SRC_NAME)/build
rm -f config_done
$(eval $(call BuildPackage,ttyd))

romfs:
$(ROMFSINST) $(THISDIR)/$(SRC_NAME)/build/ttyd /usr/bin/ttyd
$(ROMFSINST) $(THISDIR)/ttyd.sh /usr/bin/ttyd.sh
$(INSTALL_DIR) $(ROMFSDIR)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ttyd $(ROMFSDIR)/usr/bin/ttyd
$(INSTALL_BIN) ./ttyd.sh $(ROMFSDIR)/usr/bin/ttyd.sh
Binary file removed trunk/user/ttyd/ttyd-1.7.3.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion trunk/user/ttyd/ttyd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ nvram_ttyd_port="$(nvram get ttyd_port)"
port=${nvram_ttyd_port:-"7681"}

func_start(){
start-stop-daemon -S -b -x ttyd -- -i br0 -p "$port" -t disableReconnect=true -t disableLeaveAlert=true login
start-stop-daemon -S -b -x ttyd -- -i br0 -p "$port" -W -t disableReconnect=true -t disableLeaveAlert=true login
}

func_stop(){
Expand Down

0 comments on commit 3117969

Please sign in to comment.