From 1b94dc9c477359d01742086e1568845987b6661e Mon Sep 17 00:00:00 2001 From: sadlerm4 Date: Tue, 17 Dec 2024 08:38:56 +1100 Subject: [PATCH 1/4] add: tmon --- anda/devs/tmon/anda.hcl | 5 +++++ anda/devs/tmon/tmon.spec | 46 ++++++++++++++++++++++++++++++++++++++ anda/devs/tmon/update.rhai | 6 +++++ 3 files changed, 57 insertions(+) create mode 100644 anda/devs/tmon/anda.hcl create mode 100644 anda/devs/tmon/tmon.spec create mode 100644 anda/devs/tmon/update.rhai diff --git a/anda/devs/tmon/anda.hcl b/anda/devs/tmon/anda.hcl new file mode 100644 index 000000000..e72e5561c --- /dev/null +++ b/anda/devs/tmon/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "tmon.spec" + } +} diff --git a/anda/devs/tmon/tmon.spec b/anda/devs/tmon/tmon.spec new file mode 100644 index 000000000..43f0eb477 --- /dev/null +++ b/anda/devs/tmon/tmon.spec @@ -0,0 +1,46 @@ +%global commit e8cae0d88dc8d51cb0e34e3fd3553bcbdaf04ca5 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20241215 +%global debug_package %{nil} + +Name: tmon +Version: %{commit_date}.git~%{shortcommit} +Release: 1%{?dist} +Summary: A tiny system monitor for Linux + +License: GPL-3.0 +URL: https://github.com/pondda/tmon +Source0: %{url}/archive/%{commit}.tar.gz + +Requires: lm_sensors +Conflicts: kernel-tools + +Suggests: nerd-fonts + +BuildRequires: make gcc-c++ ncurses-devel + +%description +%{summary} + +%prep +%autosetup -n %{name}-%{commit} + +%build +%make_build + +%install +install -m 0755 -vd %{buildroot}/%{_bindir} +install -m 0755 -vp tmon %{buildroot}/%{_bindir}/tmon +install -m 0755 -vd %{buildroot}/%{_sysconfdir}/tmon +install -m 0644 -vp default.conf %{buildroot}/%{_sysconfdir}/tmon/ + +%files +%license LICENSE +%doc README.md +%{_bindir}/tmon +%{_sysconfdir}/tmon/default.conf + +%changelog +* Tue Dec 17 2024 sadlerm +- Initial package + diff --git a/anda/devs/tmon/update.rhai b/anda/devs/tmon/update.rhai new file mode 100644 index 000000000..9e475ef20 --- /dev/null +++ b/anda/devs/tmon/update.rhai @@ -0,0 +1,6 @@ +rpm.global("commit", gh_commit("pondda/tmon")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); +} + From 444aa919f3cd5a0c5a33470b1707cbc25dcd6509 Mon Sep 17 00:00:00 2001 From: sadlerm4 Date: Tue, 17 Dec 2024 23:20:47 +1100 Subject: [PATCH 2/4] license clarification Co-authored-by: madomado Signed-off-by: sadlerm4 --- anda/devs/tmon/tmon.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anda/devs/tmon/tmon.spec b/anda/devs/tmon/tmon.spec index 43f0eb477..a93496302 100644 --- a/anda/devs/tmon/tmon.spec +++ b/anda/devs/tmon/tmon.spec @@ -8,7 +8,7 @@ Version: %{commit_date}.git~%{shortcommit} Release: 1%{?dist} Summary: A tiny system monitor for Linux -License: GPL-3.0 +License: GPL-3.0-only URL: https://github.com/pondda/tmon Source0: %{url}/archive/%{commit}.tar.gz From 071ba3125ab0c89909cea3b363bdfce4dbdc5b23 Mon Sep 17 00:00:00 2001 From: sadlerm4 Date: Wed, 18 Dec 2024 01:45:09 +1100 Subject: [PATCH 3/4] clean up macro syntax and add packager: --- anda/devs/tmon/tmon.spec | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/anda/devs/tmon/tmon.spec b/anda/devs/tmon/tmon.spec index a93496302..eef7872b5 100644 --- a/anda/devs/tmon/tmon.spec +++ b/anda/devs/tmon/tmon.spec @@ -9,7 +9,7 @@ Release: 1%{?dist} Summary: A tiny system monitor for Linux License: GPL-3.0-only -URL: https://github.com/pondda/tmon +URL: https://github.com/pondda/%{name} Source0: %{url}/archive/%{commit}.tar.gz Requires: lm_sensors @@ -19,8 +19,10 @@ Suggests: nerd-fonts BuildRequires: make gcc-c++ ncurses-devel +Packager: sadlerm + %description -%{summary} +%{summary}. %prep %autosetup -n %{name}-%{commit} @@ -29,16 +31,16 @@ BuildRequires: make gcc-c++ ncurses-devel %make_build %install -install -m 0755 -vd %{buildroot}/%{_bindir} -install -m 0755 -vp tmon %{buildroot}/%{_bindir}/tmon -install -m 0755 -vd %{buildroot}/%{_sysconfdir}/tmon -install -m 0644 -vp default.conf %{buildroot}/%{_sysconfdir}/tmon/ +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{name} %{buildroot}%{_bindir}/%{name} +install -m 0755 -vd %{buildroot}%{_sysconfdir}/%{name} +install -m 0644 -vp default.conf %{buildroot}%{_sysconfdir}/%{name}/ %files %license LICENSE %doc README.md -%{_bindir}/tmon -%{_sysconfdir}/tmon/default.conf +%{_bindir}/%{name} +%{_sysconfdir}/%{name}/default.conf %changelog * Tue Dec 17 2024 sadlerm From 786147f4e0ee6fa57fdb688fa58f26ca8eab8a66 Mon Sep 17 00:00:00 2001 From: sadlerm4 Date: Wed, 18 Dec 2024 09:08:49 +1100 Subject: [PATCH 4/4] recommend noto-color-emoji --- anda/devs/tmon/tmon.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anda/devs/tmon/tmon.spec b/anda/devs/tmon/tmon.spec index eef7872b5..525ef254c 100644 --- a/anda/devs/tmon/tmon.spec +++ b/anda/devs/tmon/tmon.spec @@ -15,7 +15,7 @@ Source0: %{url}/archive/%{commit}.tar.gz Requires: lm_sensors Conflicts: kernel-tools -Suggests: nerd-fonts +Recommends: google-noto-color-emoji-fonts BuildRequires: make gcc-c++ ncurses-devel