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..525ef254c --- /dev/null +++ b/anda/devs/tmon/tmon.spec @@ -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 + +%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 +- 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()); +} +