Skip to content
Snippets Groups Projects
Verified Commit 6b4e9909 authored by Josef Schlehofer's avatar Josef Schlehofer
Browse files

patches/packages: reptyr, psmisc: backport upstreamed packages

parent cc7bc5ed
1 merge request!270patches/packages: reptyr, psmisc: backport upstreamed packages
From 1b8711877c7f57d85a8449836b0a802503921d28 Mon Sep 17 00:00:00 2001
From: Josef Schlehofer <pepe.schlehofer@gmail.com>
Date: Sat, 17 Oct 2020 18:06:59 +0200
Subject: [PATCH] psmisc: add package
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
---
utils/psmisc/Makefile | 53 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
create mode 100644 utils/psmisc/Makefile
diff --git a/utils/psmisc/Makefile b/utils/psmisc/Makefile
new file mode 100644
index 000000000..9f637d924
--- /dev/null
+++ b/utils/psmisc/Makefile
@@ -0,0 +1,53 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=psmisc
+PKG_VERSION:=23.3
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=@SF/psmisc
+PKG_HASH:=41750e1a5abf7ed2647b094f58127c73dbce6876f77ba4e0a7e0995ae5c7279a
+
+PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/psmisc
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=proc utilities
+ URL:=https://gitlab.com/psmisc/psmisc/
+ DEPENDS:=+libncurses
+endef
+
+define Package/psmisc/description
+ psmisc is a set of additional small useful utilities that use
+ the proc filesystem like fuser, killall, prtstat, pstree.
+endef
+
+CONFIGURE_ARGS += \
+ --disable-harden-flags
+
+MAKE_FLAGS += \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ CPPFLAGS="$(TARGET_CPPFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)"
+
+define Package/psmisc/preinst
+#!/bin/sh
+if [ -e $${IPKG_INSTROOT}/usr/bin/killall ]; then
+ rm $${IPKG_INSTROOT}/usr/bin/killall;
+fi
+endef
+
+define Package/psmisc/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{fuser,killall,prtstat,pstree} $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,psmisc))
--
2.25.1
From ddad2a9bfef9fe78822ba817e61ca3dde2181457 Mon Sep 17 00:00:00 2001
From: Josef Schlehofer <pepe.schlehofer@gmail.com>
Date: Sat, 17 Oct 2020 18:30:06 +0200
Subject: [PATCH] reptyr: add package
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
---
utils/reptyr/Makefile | 44 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 utils/reptyr/Makefile
diff --git a/utils/reptyr/Makefile b/utils/reptyr/Makefile
new file mode 100644
index 000000000..4a9df64cd
--- /dev/null
+++ b/utils/reptyr/Makefile
@@ -0,0 +1,44 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=reptyr
+PKG_VERSION:=0.8.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/nelhage/reptyr/archive/
+PKG_HASH:=4b470ed2a0d25fed591739fa9613ce7ad3d0377891eb56cbe914e3c85db46ca8
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_NAME)-$(PKG_VERSION)
+
+PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
+PKG_LICENSE:=MIT
+PKG_LICENSE_FILES:=COPYING
+
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/reptyr
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Tool for reparenting running programs
+ URL:=https://github.com/nelhage/reptyr
+ DEPENDS:=@!(arc||mips)
+endef
+
+define Package/reptyr/description
+ reptyr is a utility for taking an existing running program and attaching it
+ to a new terminal. Started a long-running process over ssh, but have to
+ leave and don't want to interrupt it? Just start a screen, use reptyr to
+ grab it, and then kill the ssh session and head on home.
+endef
+
+MAKE_FLAGS+= \
+ PREFIX=/usr
+
+define Package/reptyr/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/reptyr $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,reptyr))
--
2.25.1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment