Skip to content

Commit

Permalink
add: tmon (#2653)
Browse files Browse the repository at this point in the history
* add: tmon

* license clarification

Co-authored-by: madomado <[email protected]>
Signed-off-by: sadlerm4 <[email protected]>

* clean up macro syntax and add packager:

---------

Signed-off-by: sadlerm4 <[email protected]>
Co-authored-by: madomado <[email protected]>
  • Loading branch information
sadlerm4 and madonuko authored Dec 18, 2024
1 parent 07b32fa commit 2f67657
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
5 changes: 5 additions & 0 deletions anda/devs/tmon/anda.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
project pkg {
rpm {
spec = "tmon.spec"
}
}
48 changes: 48 additions & 0 deletions anda/devs/tmon/tmon.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
%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-only
URL: https://github.com/pondda/%{name}
Source0: %{url}/archive/%{commit}.tar.gz

Requires: lm_sensors
Conflicts: kernel-tools

Recommends: google-noto-color-emoji-fonts

BuildRequires: make gcc-c++ ncurses-devel

Packager: sadlerm <[email protected]>

%description
%{summary}.

%prep
%autosetup -n %{name}-%{commit}

%build
%make_build

%install
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}/%{name}
%{_sysconfdir}/%{name}/default.conf

%changelog
* Tue Dec 17 2024 sadlerm <[email protected]>
- Initial package

6 changes: 6 additions & 0 deletions anda/devs/tmon/update.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
rpm.global("commit", gh_commit("pondda/tmon"));
if rpm.changed() {
rpm.release();
rpm.global("commit_date", date());
}

0 comments on commit 2f67657

Please sign in to comment.