File diskonaut.spec of Package diskonaut
#
# spec file for package diskonaut
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: diskonaut
Version: 0.6.0
Release: 0
Summary: Terminal disk space navigator
License: MIT
URL: https://github.com/imsnif/%{version}
Source0: %{url}/archive/%{version}.tar.gz
Source1: vendor.tar.xz
BuildRequires: rust-packaging
%description
How does it work?
Given a path on your hard-drive (which could also be the root path, eg. /).
diskonaut scans it and maps it to memory so that you could explore its contents
(even while still scanning!).
Once completed, you can navigate through subfolders, getting a visual treemap
representation of what's taking up your disk space. You can even delete files
or folders and diskonaut will track how much space you've freed up in this session.
%prep
%setup -qa1
mkdir -p .cargo
cat >.cargo/config <<EOF
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
EOF
%build
cargo build --release --locked %{?_smp_mflags}
%install
cargo install --root=%{buildroot}%{_prefix} --path .
# remove residue crate file
rm %{buildroot}%{_prefix}/.crates.toml
rm %{buildroot}%{_prefix}/.crates2.json
%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%changelog