# Generated by rust2rpm 28 %bcond check 1 %global crate diskus Name: rust-diskus Version: 0.9.0 Release: %autorelease Summary: Minimal, fast alternative to 'du -sh' # Upstream license specification: MIT/Apache-2.0 License: MIT OR Apache-2.0 URL: https://crates.io/crates/diskus Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * Migrate tests from tempdir to tempfile. The tempdir crate is no longer # maintained, and the project was archived. # https://github.com/sharkdp/diskus/pull/59 This requires the source-code # patch diskus-0.9.0-tempdir-tempfile.patch. Patch: diskus-fix-metadata.diff # * Source-code changes to migrate tests from tempdir to tempfile, # diskus-0.9.0-tempdir-tempfile.patch. Patch10: diskus-0.9.0-tempdir-tempfile.patch BuildRequires: cargo-rpm-macros >= 24 BuildRequires: help2man %global _description %{expand: A minimal, fast alternative to 'du -sh'.} %description %{_description} %package -n %{crate} Summary: %{summary} # Apache-2.0 OR MIT # Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT # MIT # MIT OR Apache-2.0 License: %{shrink: (MIT OR Apache-2.0) AND MIT AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) } # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE-APACHE %license LICENSE-MIT %license LICENSE.dependencies %doc CHANGELOG.md %doc README.md %{_bindir}/diskus %{_mandir}/man1/diskus.1* %package devel Summary: %{summary} BuildArch: noarch %description devel %{_description} This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel %license %{crate_instdir}/LICENSE-APACHE %license %{crate_instdir}/LICENSE-MIT %doc %{crate_instdir}/CHANGELOG.md %doc %{crate_instdir}/README.md %{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+default-devel %{_description} This package contains library source intended for building other packages which use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+cli-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+cli-devel %{_description} This package contains library source intended for building other packages which use the "cli" feature of the "%{crate}" crate. %files -n %{name}+cli-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies help2man \ --no-info \ --output=diskus.1 \ --name='Compute disk usage for the given filesystem entries' \ target/rpm/diskus %install %cargo_install install -t %{buildroot}%{_mandir}/man1 -D -p -m 0644 diskus.1 %if %{with check} %check %cargo_test %endif %changelog %autochangelog