progress: Add package
authorNikil Mehta <redacted>
Sat, 26 Nov 2016 09:31:31 +0000 (01:31 -0800)
committerNikil Mehta <redacted>
Tue, 6 Dec 2016 07:25:36 +0000 (23:25 -0800)
Signed-off-by: Nikil Mehta nikil.mehta@gmail.com
utils/progress/Makefile [new file with mode: 0644]
utils/progress/patches/001_set-ncurses-lib.patch [new file with mode: 0644]

diff --git a/utils/progress/Makefile b/utils/progress/Makefile
new file mode 100644 (file)
index 0000000..4f03b7a
--- /dev/null
@@ -0,0 +1,54 @@
+#
+# Copyright (C) 2016 Nikil Mehta <nikil.mehta@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=progress
+PKG_VERSION:=0.13.1
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/Xfennec/progress.git
+PKG_SOURCE_VERSION:=f6894b827c638af5cf8c5c622e66491c179ba2eb
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
+
+PKG_MAINTAINER:=Nikil Mehta <nikil.mehta@gmail.com>
+PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=LICENSE
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/progress
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Coreutils Progress Viewer (formerly known as 'cv')
+  URL:=https://github.com/Xfennec/progress
+  DEPENDS:=+libncursesw
+endef
+
+define Package/progress/description
+       This tool can be described as a Tiny, Dirty, Linux-and-OSX-Only
+       C command that looks for coreutils basic commands (cp, mv, dd, tar,
+       gzip/gunzip, cat, etc.) currently running on your system and
+       displays the percentage of copied data. It can also show estimated
+       time and throughput, and provide a "top-like" mode (monitoring).
+       .
+       It simply scans `/proc` for interesting commands, and then looks at
+       directories `fd` and `fdinfo` to find opened files and seek positions,
+       and reports status for the largest file.
+       .
+       It's very light, and compatible with virtually any command.
+       This program was formerly known as 'cv' on github.
+endef
+
+define Package/progress/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/progress $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,progress))
diff --git a/utils/progress/patches/001_set-ncurses-lib.patch b/utils/progress/patches/001_set-ncurses-lib.patch
new file mode 100644 (file)
index 0000000..64b3508
--- /dev/null
@@ -0,0 +1,23 @@
+--- a/Makefile 2016-11-26 01:24:23.392903433 -0800
++++ b/Makefile 2016-11-26 01:24:41.084939184 -0800
+@@ -1,19 +1,6 @@
+ OBJ = progress
+ override CFLAGS += -g -Wall -D_FILE_OFFSET_BITS=64
+-override LDFLAGS += -lm
+-UNAME := $(shell uname)
+-ifeq ($(UNAME), Linux)
+-    ifeq (, $(shell which pkg-config 2> /dev/null))
+-    $(error "pkg-config command not found")
+-    endif
+-    ifeq (, $(shell pkg-config ncurses --libs 2> /dev/null))
+-    $(error "ncurses package not found")
+-    endif
+-    override LDFLAGS += $(shell pkg-config ncurses --libs)
+-endif
+-ifeq ($(UNAME), Darwin)
+-    override LDFLAGS += -lncurses
+-endif
++override LDFLAGS += -lm -lncursesw
+ PREFIX ?= /usr/local
+ BINDIR = $(PREFIX)/bin
+ MANDIR = $(PREFIX)/share/man/man1
git clone https://git.99rst.org/PROJECT