1 %define vendor_version 0.7.7
3 Summary: Top-like interface for container metrics
8 Group: Applications/System
9 Source0: https://github.com/bcicen/ctop/archive/v%{version}/%{name}-%{version}.tar.gz
10 # Source0-md5: 9221f9bd69952392c47b8570d2ba25eb
11 Source1: %{name}-vendor-%{vendor_version}.tar.xz
12 # Source1-md5: 66c94eb62c9a648fb69a2a95cbafa3c3
14 BuildRequires: golang >= 1.15
15 BuildRequires: rpmbuild(macros) >= 2.009
16 BuildRequires: tar >= 1:1.22
18 ExclusiveArch: %go_arches
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 %define _debugsource_packages 0
24 ctop provides a concise and condensed overview of real-time metrics
25 for multiple containers as well as a single container view for
26 inspecting a specific container.
28 ctop comes with built-in support for Docker and runC.
33 %{__mv} ctop-%{vendor_version}/vendor .
38 %__go build -v -mod=vendor -o target/%{name}
41 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT%{_bindir}
45 cp -p target/%{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
48 rm -rf $RPM_BUILD_ROOT
50 %defattr(644,root,root,755)
52 %attr(755,root,root) %{_bindir}/%{name}