From f6adf59458b5c43d0668e44833688c3e37eba41f Mon Sep 17 00:00:00 2001 From: Tiago Rocha Date: Sat, 2 May 2026 15:53:31 -0300 Subject: [PATCH] afetch: add new package (2.2.0) Fast and simple system info (for UNIX based operating systems) written in POSIX compliant C99. Link: https://github.com/13-CF/afetch Signed-off-by: Tiago Rocha --- utils/afetch/Makefile | 35 +++++++++++++++++++ .../patches/100-add_openwrt_support.patch | 22 ++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 utils/afetch/Makefile create mode 100644 utils/afetch/patches/100-add_openwrt_support.patch diff --git a/utils/afetch/Makefile b/utils/afetch/Makefile new file mode 100644 index 00000000000000..63b73c0ca900ef --- /dev/null +++ b/utils/afetch/Makefile @@ -0,0 +1,35 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=afetch +PKG_VERSION:=2.2.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/13-CF/afetch/tar.gz/V$(PKG_VERSION)? +PKG_HASH:=e1f4630b2f8aea0edb76676afbfba9b92c819c6df5da68eb5b89da9c330e2fcd + +PKG_MAINTAINER:=Tiago Rocha +PKG_LICENSE:=GPL-3.0-only +PKG_LICENSE_FILES:=LICENSE + +include $(INCLUDE_DIR)/package.mk + +define Package/afetch + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Fast and simple system info written in C + DEPENDS:=+base-files + URL:=https://github.com/13-CF/afetch +endef + +define Package/afetch/description + Fast and simple system info (for UNIX based operating systems) + written in POSIX compliant C99. +endef + +define Package/afetch/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/afetch $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,afetch)) diff --git a/utils/afetch/patches/100-add_openwrt_support.patch b/utils/afetch/patches/100-add_openwrt_support.patch new file mode 100644 index 00000000000000..1b8cd5147e44e8 --- /dev/null +++ b/utils/afetch/patches/100-add_openwrt_support.patch @@ -0,0 +1,22 @@ +Index: afetch-2.2.0/src/fetch.c +=================================================================== +--- afetch-2.2.0.orig/src/fetch.c ++++ afetch-2.2.0/src/fetch.c +@@ -338,6 +338,17 @@ void *os() + info.col7 = BGREEN "__________/"; + info.col8 = BGREEN ""; + info.getPkgCount = "rpm -qa | wc -l"; ++ } else if (strncmp(osname, "OpenWrt", 7) == 0) { ++ info.col1 = BWHITE " ______ \n" BBLUE; ++ info.col2 = BWHITE " / ____ \\ " BBLUE; ++ info.col3 = BWHITE " / __ \\ " BBLUE; ++ info.col4 = BBLUE " / "BWHITE"/ \\ "BBLUE"\\ " BBLUE; ++ info.col5 = BBLUE " \\ "BWHITE"()"BBLUE" / " BBLUE; ++ info.col6 = BBLUE " \\____/ " BBLUE; ++ info.col7 = BBLUE " OpenWrt " BBLUE; ++ info.col8 = BBLUE ""; ++ info.getPkgCount = ++ "grep 'P:' /lib/apk/db/installed | wc -l"; + } else if (strncmp(osname, "Parabola", 8) == 0) { + info.col1 = BMAGENTA ""; + info.col2 = BMAGENTA " __ __ __ _ ";