mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 03:09:08 +08:00
tmate: remove upstreamed pacakge
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
ada2ddd302
commit
f16dda6edd
@ -1,57 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2021 ImmortalWrt
|
||||
# <https://immortalwrt.org>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=tmate
|
||||
PKG_VERSION:=2.4.0
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/tmate-io/tmate.git
|
||||
PKG_SOURCE_DATE:=2020-04-25
|
||||
PKG_SOURCE_VERSION:=cbec43f56dfb48c2fb6e00faa2cb85443d4b7d8f
|
||||
PKG_MIRROR_HASH:=8622869c8acfa147275d4658fbc2c9afdc9dde45d5d07fc4a4cb51ec740a8ac7
|
||||
|
||||
PKG_LICENSE:=ISC
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=CN_SZTL <cnsztl@immortalwrt.org>
|
||||
|
||||
PKG_BUILD_DEPENDS:=ncurses
|
||||
PKG_FIXUP:=autoreconf
|
||||
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:=+libpthread +libevent2 +libssh +libmsgpack-c +libncurses
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS+= \
|
||||
--oldincludedir=$(STAGING_DIR)
|
||||
|
||||
CONFIGURE_VARS+= \
|
||||
LIBSSH_CFLAGS="-I$(STAGING_DIR)/usr/include" \
|
||||
LIBSSH_LIBS="-lssh"
|
||||
|
||||
define Package/tmate/description
|
||||
Tmate is a fork of tmux. It provides an instant pairing solution.
|
||||
endef
|
||||
|
||||
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))
|
@ -1,67 +0,0 @@
|
||||
diff -Naur /dev/null b/compat/forkpty-linux.c
|
||||
--- /dev/null 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ b/compat/forkpty-linux.c 2014-01-08 12:44:00.885192436 +0100
|
||||
@@ -0,0 +1,63 @@
|
||||
+#include <fcntl.h>
|
||||
+#include <sys/ioctl.h>
|
||||
+#include <sys/param.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <termios.h>
|
||||
+#include <unistd.h>
|
||||
+
|
||||
+int login_tty(int fd)
|
||||
+{
|
||||
+ setsid();
|
||||
+ if (ioctl(fd, TIOCSCTTY, NULL) == -1) return -1;
|
||||
+ dup2(fd, 0);
|
||||
+ dup2(fd, 1);
|
||||
+ dup2(fd, 2);
|
||||
+ if (fd > 2) close(fd);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int openpty(int *amaster, int *aslave, char *name, struct termios *termp, struct winsize *winp)
|
||||
+{
|
||||
+ char buf[512];
|
||||
+ int master, slave;
|
||||
+
|
||||
+ master = open("/dev/ptmx", O_RDWR);
|
||||
+ if (master == -1) return -1;
|
||||
+ if (grantpt(master) || unlockpt(master) || ptsname_r(master, buf, sizeof buf)) goto fail;
|
||||
+
|
||||
+ slave = open(buf, O_RDWR | O_NOCTTY);
|
||||
+ if (slave == -1) goto fail;
|
||||
+
|
||||
+ /* XXX Should we ignore errors here? */
|
||||
+ if (termp) tcsetattr(slave, TCSAFLUSH, termp);
|
||||
+ if (winp) ioctl(slave, TIOCSWINSZ, winp);
|
||||
+
|
||||
+ *amaster = master;
|
||||
+ *aslave = slave;
|
||||
+ if (name != NULL) strcpy(name, buf);
|
||||
+ return 0;
|
||||
+
|
||||
+fail:
|
||||
+ close(master);
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+int forkpty(int *amaster, char *name, struct termios *termp, struct winsize *winp)
|
||||
+{
|
||||
+ int master, slave, pid;
|
||||
+ if (openpty(&master, &slave, name, termp, winp) == -1) return -1;
|
||||
+ switch (pid = fork()) {
|
||||
+ case -1:
|
||||
+ return -1;
|
||||
+ case 0:
|
||||
+ close(master);
|
||||
+ if (login_tty (slave)) _exit (1);
|
||||
+ return 0;
|
||||
+ default:
|
||||
+ *amaster = master;
|
||||
+ close (slave);
|
||||
+ return pid;
|
||||
+ }
|
||||
+}
|
@ -1,11 +0,0 @@
|
||||
--- a/compat/setenv.c 2019-11-17 06:09:38.000000000 +0800
|
||||
+++ b/compat/setenv.c 2020-02-20 05:36:25.183144203 +0800
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "tmux.h"
|
||||
|
||||
int
|
||||
-setenv(const char *name, const char *value, unused int overwrite)
|
||||
+setenv(const char *name, const char *value, int overwrite)
|
||||
{
|
||||
char *newval;
|
||||
|
Loading…
x
Reference in New Issue
Block a user