diff --git a/trunk/user/ttyd/.gitignore b/trunk/user/ttyd/.gitignore deleted file mode 100644 index 4d5ebed7a1f..00000000000 --- a/trunk/user/ttyd/.gitignore +++ /dev/null @@ -1 +0,0 @@ -ttyd-*/ \ No newline at end of file diff --git a/trunk/user/ttyd/Makefile b/trunk/user/ttyd/Makefile index b54d8075333..9cc591087e8 100644 --- a/trunk/user/ttyd/Makefile +++ b/trunk/user/ttyd/Makefile @@ -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 diff --git a/trunk/user/ttyd/ttyd-1.7.3.tar.gz b/trunk/user/ttyd/ttyd-1.7.3.tar.gz deleted file mode 100644 index 40b30a7f894..00000000000 Binary files a/trunk/user/ttyd/ttyd-1.7.3.tar.gz and /dev/null differ diff --git a/trunk/user/ttyd/ttyd.sh b/trunk/user/ttyd/ttyd.sh index 0459d884d35..e116c6fda3b 100755 --- a/trunk/user/ttyd/ttyd.sh +++ b/trunk/user/ttyd/ttyd.sh @@ -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(){