diff --git a/anda/apps/socktop/anda.hcl b/anda/apps/socktop/anda.hcl new file mode 100644 index 0000000000..1038af94e2 --- /dev/null +++ b/anda/apps/socktop/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "socktop.spec" + } +} diff --git a/anda/apps/socktop/socktop.spec b/anda/apps/socktop/socktop.spec new file mode 100644 index 0000000000..fe5117effc --- /dev/null +++ b/anda/apps/socktop/socktop.spec @@ -0,0 +1,53 @@ +%global ver 1.55.0-test2 +%global sanitized_ver %(echo %{ver} | sed 's/-//g') + +Name: socktop +Version: %sanitized_ver +Release: 1%?dist +Summary: socktop is a remote system monitor with a rich TUI interface +URL: https://github.com/jasonwitty/socktop +Source0: %{url}/archive/refs/tags/v%{ver}.tar.gz +License: MIT +BuildRequires: rust libdrm-devel systemd-rpm-macros cargo-rpm-macros +Requires: libdrm +Packager: lux8149 + +%description +socktop is a remote system monitor with a rich TUI interface, inspired by `top` and `btop`, +that communicates with a lightweight remote agent over WebSockets. + +%prep +%autosetup -n %{name}-%{ver} +%cargo_prep_online + +%build +%cargo_build + +%install +install -Dm 755 target/rpm/socktop %{buildroot}%{_bindir}/socktop +install -Dm 755 target/rpm/socktop_agent %{buildroot}%{_bindir}/socktop_agent +install -Dm 644 target/rpm/libsocktop_connector.so %{buildroot}%{_libdir}/libsocktop_connector.so +install -Dm 644 docs/socktop-agent.service %{buildroot}%{_unitdir}/socktop-agent.service +%{cargo_license_online} > LICENSE.dependencies + +%post +%systemd_post socktop-agent.service + +%preun +%systemd_preun socktop-agent.service + +%postun +%systemd_postun_with_restart socktop-agent.service + +%files +%doc README.md +%license LICENSE +%license LICENSE.dependencies +%{_bindir}/socktop +%{_bindir}/socktop_agent +%{_libdir}/libsocktop_connector.so +%{_unitdir}/socktop-agent.service + +%changelog +* Sun Jan 04 2026 lux8149 +- Initial Package diff --git a/anda/apps/socktop/update.rhai b/anda/apps/socktop/update.rhai new file mode 100644 index 0000000000..f8fadc9d1f --- /dev/null +++ b/anda/apps/socktop/update.rhai @@ -0,0 +1 @@ +rpm.global("ver", gh("jasonwitty/socktop"));