From: Tianling Shen Date: Thu, 18 Mar 2021 05:12:13 +0000 (+0800) Subject: tmate: add new package X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=a8a4059284bb02a0d6266d13eeac06be7730dd82;p=feed%2Fpackages.git tmate: add new package Tmate is a fork of tmux. It provides an instant pairing solution. For more details, see https://tmate.io. Signed-off-by: Tianling Shen (cherry picked from commit ccfe1bfa508e7041c4b5f902f1354ef9566bff28) --- diff --git a/net/tmate/Makefile b/net/tmate/Makefile new file mode 100644 index 0000000000..b2d50f92b1 --- /dev/null +++ b/net/tmate/Makefile @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: GPL-3.0-only +# +# Copyright (C) 2021 ImmortalWrt.org + +include $(TOPDIR)/rules.mk + +PKG_NAME:=tmate +PKG_VERSION:=2.4.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/tmate-io/tmate/tar.gz/$(PKG_VERSION)? +PKG_HASH:=62b61eb12ab394012c861f6b48ba0bc04ac8765abca13bdde5a4d9105cb16138 + +PKG_LICENSE:=ISC +PKG_LICENSE_FILES:=LICENSE +PKG_MAINTAINER:=Tianling Shen + +PKG_FIXUP:=autoreconf +PKG_BUILD_DEPENDS:=ncurses +PKG_BUILD_PARALLEL:=1 +PKG_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/tmate + SECTION:=net + CATEGORY:=Network + SUBMENU:=SSH + TITLE:=Instant Terminal Sharing + URL:=https://tmate.io + DEPENDS:=+libevent2 +libncurses +libpthread +libssh +msgpack-c +terminfo +endef + +define Package/tmate/description + Tmate is a fork of tmux. It provides an instant pairing solution. +endef + +CONFIGURE_ARGS+= \ + --oldincludedir="$(STAGING_DIR)" + +CONFIGURE_VARS+= \ + LIBSSH_CFLAGS="-I$(STAGING_DIR)/usr/include" \ + LIBSSH_LIBS="-lssh" + +define Package/tmate/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tmate $(1)/usr/bin/tmate +endef + +$(eval $(call BuildPackage,tmate)) diff --git a/net/tmate/patches/010-Avoid-initializing-stdout-twice.patch b/net/tmate/patches/010-Avoid-initializing-stdout-twice.patch new file mode 100644 index 0000000000..ca2d7030df --- /dev/null +++ b/net/tmate/patches/010-Avoid-initializing-stdout-twice.patch @@ -0,0 +1,22 @@ +From 9e3e39d66ddb4a610720fa37a5683c846d2a1ba6 Mon Sep 17 00:00:00 2001 +From: Nicolas Viennot +Date: Wed, 11 Mar 2020 11:30:33 -0400 +Subject: [PATCH] Avoid initializing stdout twice + +Closes #190 +--- + log.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/log.c ++++ b/log.c +@@ -61,6 +61,9 @@ log_get_level(void) + void + log_open_fp(FILE *f) + { ++ if (log_file == f) ++ return; ++ + if (log_file != NULL && !is_log_stdout()) + fclose(log_file); + diff --git a/net/tmate/test.sh b/net/tmate/test.sh new file mode 100644 index 0000000000..0f4a86651c --- /dev/null +++ b/net/tmate/test.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +tmate -V | grep "$PKG_VERSION"