tmate/msgpack-c: add packages
This commit is contained in:
parent
e81bf32a9f
commit
98473f68d9
71
package/ctcgfw/msgpack-c/Makefile
Normal file
71
package/ctcgfw/msgpack-c/Makefile
Normal file
@ -0,0 +1,71 @@
|
||||
#
|
||||
# Copyright (C) 2019 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=msgpack-c
|
||||
PKG_VERSION:=3.2.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/msgpack/msgpack-c.git
|
||||
PKG_SOURCE_VERSION:=8085ab8721090a447cf98bb802d1406ad7afe420
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_HASH:=464f46744a6be778626d11452c4db3c2d09461080c6db42e358e21af19d542f6
|
||||
|
||||
PKG_LICENSE:=GPLv3
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=[CTCGFW]Project OpenWrt
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=lib
|
||||
CATEGORY:=Libraries
|
||||
URL:=https://github.com/msgpack/msgpack-c
|
||||
TITLE:=MessagePack implementation for C and C++ / msgpack.org[C/C++]
|
||||
endef
|
||||
|
||||
define Package/lib$(PKG_NAME)
|
||||
$(call Package/$(PKG_NAME))
|
||||
TITLE+= (Libraries)
|
||||
VARIANT:=lib
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
MessagePack is an efficient binary serialization format, which lets you exchange data among multiple languages like JSON, except that it's faster and smaller. Small integers are encoded into a single byte and short strings require only one extra byte in addition to the strings themselves.
|
||||
endef
|
||||
|
||||
define Package/lib$(PKG_NAME)/description
|
||||
$(call Package/$(PKG_NAME)/description)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/lib $(1)/usr/include $(1)/usr/lib/pkgconfig $(1)/usr/lib/cmake
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libmsgpackc.* $(1)/usr/lib/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/include/msgpack.h $(1)/usr/include/msgpack.h
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/include/msgpack.hpp $(1)/usr/include/msgpack.hpp
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/msgpack.pc $(1)/usr/lib/pkgconfig/msgpack.pc
|
||||
$(CP) $(PKG_BUILD_DIR)/include/msgpack $(1)/usr/include/msgpack
|
||||
$(CP) $(PKG_BUILD_DIR)/CMakeFiles/Export/lib/cmake/msgpack $(1)/usr/lib/cmake/msgpack
|
||||
endef
|
||||
|
||||
define Package/lib$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libmsgpackc.* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
$(eval $(call BuildPackage,lib$(PKG_NAME)))
|
||||
51
package/ctcgfw/tmate/Makefile
Normal file
51
package/ctcgfw/tmate/Makefile
Normal file
@ -0,0 +1,51 @@
|
||||
#
|
||||
# Copyright (C) 2019 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=tmate
|
||||
PKG_VERSION:=2.4.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/tmate-io/tmate.git
|
||||
PKG_SOURCE_VERSION:=5e00bfa5e137e76c81888727712ced2b3fd99f5b
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_HASH:=62b61eb12ab394012c861f6b48ba0bc04ac8765abca13bdde5a4d9105cb16138
|
||||
|
||||
PKG_LICENSE:=GPLv3
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=[CTCGFW]Project OpenWrt
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_DEPENDS:=msgpack-c ncurses
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Instant Terminal Sharing
|
||||
URL:=https://tmate.io
|
||||
DEPENDS:=+libpthread +libevent2 +libssh +libmsgpack-c +libncurses
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
Instant Terminal Sharing.
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/tmate $(1)/usr/bin/tmate
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
@ -0,0 +1,67 @@
|
||||
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;
|
||||
+ }
|
||||
+}
|
||||
@ -0,0 +1,11 @@
|
||||
--- 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…
Reference in New Issue
Block a user