diff --git a/.gitignore b/.gitignore index dfb62e1..14fc1c1 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /hexyl-0.6.0.crate /hexyl-0.7.0.crate /hexyl-0.8.0.crate +/hexyl-0.10.0.crate diff --git a/LICENSE.dependencies b/LICENSE.dependencies new file mode 100644 index 0000000..294fda4 --- /dev/null +++ b/LICENSE.dependencies @@ -0,0 +1,18 @@ +Apache-2.0 OR MIT: indexmap v1.9.1 +MIT OR Apache-2.0: anyhow v1.0.59 +MIT OR Apache-2.0: bitflags v1.3.2 +MIT OR Apache-2.0: clap v3.2.16 +MIT OR Apache-2.0: clap_lex v0.2.4 +MIT OR Apache-2.0: hashbrown v0.12.3 +MIT OR Apache-2.0: hexyl v0.10.0 +MIT OR Apache-2.0: libc v0.2.127 +MIT OR Apache-2.0: once_cell v1.13.0 +MIT OR Apache-2.0: os_str_bytes v6.2.0 +MIT OR Apache-2.0: terminal_size v0.1.17 +MIT OR Apache-2.0: thiserror v1.0.32 +MIT: ansi_term v0.12.1 +MIT: atty v0.2.14 +MIT: strsim v0.10.0 +MIT: textwrap v0.15.0 +Unlicense OR MIT: termcolor v1.1.3 +Zlib: const_format v0.2.26 diff --git a/hexyl-fix-metadata.diff b/hexyl-fix-metadata.diff new file mode 100644 index 0000000..9ada27c --- /dev/null +++ b/hexyl-fix-metadata.diff @@ -0,0 +1,10 @@ +--- hexyl-0.10.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ hexyl-0.10.0/Cargo.toml 2022-08-07T09:57:51.824832+00:00 +@@ -21,6 +21,7 @@ + license = "MIT/Apache-2.0" + repository = "https://github.com/sharkdp/hexyl" + resolver = "2" ++exclude = ["/tests/"] + + [profile.release] + lto = true diff --git a/rust-hexyl.spec b/rust-hexyl.spec index 90dfdf9..61059bf 100644 --- a/rust-hexyl.spec +++ b/rust-hexyl.spec @@ -1,43 +1,53 @@ -# Generated by rust2rpm 13 +# Generated by rust2rpm 22 %bcond_without check %global crate hexyl -Name: rust-%{crate} -Version: 0.8.0 +Name: rust-hexyl +Version: 0.10.0 Release: %autorelease -Summary: A command-line hex viewer +Summary: Command-line hex viewer # Upstream license specification: MIT/Apache-2.0 -License: MIT or ASL 2.0 +License: MIT OR Apache-2.0 URL: https://crates.io/crates/hexyl -Source: %{crates_source} +Source0: %{crates_source} +Source1: LICENSE.dependencies +# Manually created patch for downstream crate metadata changes +# * exclude binary test data from packaged files +Patch: hexyl-fix-metadata.diff ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: -`hexyl` is a simple hex viewer for the terminal. It uses a colored output to +hexyl is a simple hex viewer for the terminal. It uses a colored output to distinguish different categories of bytes (NUL bytes, printable ASCII characters, ASCII whitespace characters, other ASCII characters and non-ASCII).} %description %{_description} -%if ! %{__cargo_skip_build} %package -n %{crate} Summary: %{summary} +# Apache-2.0 OR MIT +# MIT +# MIT OR Apache-2.0 +# Unlicense OR MIT +# Zlib +License: MIT AND Zlib +# LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} -%license LICENSE-APACHE LICENSE-MIT +%license LICENSE-APACHE +%license LICENSE-MIT +%license LICENSE.dependencies +%doc CHANGELOG.md +%doc CONTRIBUTING.md %doc README.md %{_bindir}/hexyl -%endif %package devel Summary: %{summary} @@ -45,12 +55,16 @@ BuildArch: noarch %description devel %{_description} -This package contains library source intended for building other packages -which use "%{crate}" crate. +This package contains library source intended for building other packages which +use the "%{crate}" crate. %files devel -%doc README.md -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE-APACHE +%license %{crate_instdir}/LICENSE-MIT +%doc %{crate_instdir}/CHANGELOG.md +%doc %{crate_instdir}/CONTRIBUTING.md +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -58,14 +72,15 @@ BuildArch: noarch %description -n %{name}+default-devel %{_description} -This package contains library source intended for building other packages -which use "default" feature of "%{crate}" crate. +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 %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 +cp %{SOURCE1} . %cargo_prep %generate_buildrequires diff --git a/sources b/sources index 1919547..b2068d5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hexyl-0.8.0.crate) = 8a7d53858470b5305643bf1f9b4e792d5c7eddc296718bab5e7715af1c0a9fff0f29710cb09970a2c3a768202596431a2bb1667567a5c7aecffb48c449ea0df5 +SHA512 (hexyl-0.10.0.crate) = 522ff94bc379d108e63f1a357a92f5e5e66469ee7a41320033453dfe0a2bc33b7c1a5219068c58a0d3c6d7ace2482507295f98c8850547fd2f7c557ed90da924