# For testing/benchmarking purposes # Rust version 1.43.1 # * Native [F32]: Finished release [optimized] target(s) in 9m 33s # - Binary size: 3.251.728 # * Native [F32] [codegen-units=1]: Finished release [optimized] target(s) in 7m 27s # - Binary size: 2.797.072 # * Native [F31]: Finished release [optimized] target(s) in 9m 21s # * rustup: Finished release [optimized] target(s) in 7m 10s # - Binary size: 3.304.656 # * rustup [codegen-units=1]: Finished release [optimized] target(s) in 5m 46s # - Binary size: 2.837.712 # Build with rustup or with native Fedora rust %bcond_with rustup %global debug_package %{nil} Name: bandwhich Version: 0.15.0 Release: 1%{?dist} Summary: Terminal bandwidth utilization tool License: MIT URL: https://github.com/imsnif/bandwhich Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz %if %{with rustup} BuildRequires: gcc %else BuildRequires: cargo >= 1.39 BuildRequires: rust >= 1.39 %endif %description This is a CLI utility for displaying current network utilization by process, connection and remote IP/hostname. %prep %autosetup -n %{name}-%{version} -p1 %if %{with rustup} curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal -y %endif %install %if %{with rustup} $HOME/.cargo/bin/cargo install --root=%{buildroot}%{_prefix} --path=. %else cargo install --root=%{buildroot}%{_prefix} --path=. %endif rm -f %{buildroot}%{_prefix}/.crates.toml \ rm %{buildroot}%{_prefix}/.crates2.json strip --strip-all %{buildroot}%{_bindir}/* %files %license LICENSE.md %doc README.md CONTRIBUTING.md CHANGELOG.md %{_bindir}/%{name} %changelog * Sat May 23 2020 Artem Polishchuk - 0.15.0-1 - Test package