nload: add new package
authorJacky Guo <leickwell@hotmail.com>
Thu, 20 Oct 2022 06:39:13 +0000 (14:39 +0800)
committerRosen Penev <rosenp@gmail.com>
Fri, 4 Nov 2022 20:10:38 +0000 (13:10 -0700)
Signed-off-by: Jacky Guo <leickwell@hotmail.com>
admin/nload/Makefile [new file with mode: 0644]
admin/nload/test.sh [new file with mode: 0644]

diff --git a/admin/nload/Makefile b/admin/nload/Makefile
new file mode 100644 (file)
index 0000000..b987507
--- /dev/null
@@ -0,0 +1,40 @@
+# SPDX-Identifier-License: GPL-2.0-only
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=nload
+PKG_VERSION:=0.7.4
+PKG_RELEASE:=$(AUTORELEASE)
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/rolandriegel/nload/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=a73b3a75356776860fc4c40daebce04c5022f73d39704a12fb0aeb88a751216a
+
+PKG_MAINTAINER:=Jacky Guo <leickwell@hotmail.com>
+PKG_LICENSE:=GPL-2.0-only
+PKG_LICENSE_FILES:=COPYING
+
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/nload
+  SECTION:=admin
+  CATEGORY:=Administration
+  TITLE:=A network traffic monitor
+  DEPENDS:=+libncurses +libstdcpp
+  URL:=https://github.com/rolandriegel/nload
+endef
+
+define Package/nload/description
+  Monitors network traffic and bandwidth usage.
+endef
+
+define Package/nload/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nload $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,nload))
diff --git a/admin/nload/test.sh b/admin/nload/test.sh
new file mode 100644 (file)
index 0000000..9fbe790
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+nload -h | grep "$PKG_VERSION"