diff --git a/.gitignore b/.gitignore index 59bbf03..2cd990e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /lscolors-0.6.0.crate /lscolors-0.7.0.crate /lscolors-0.7.1.crate +/lscolors-0.10.0.crate diff --git a/lscolors-fix-metadata.diff b/lscolors-fix-metadata.diff new file mode 100644 index 0000000..b712997 --- /dev/null +++ b/lscolors-fix-metadata.diff @@ -0,0 +1,11 @@ +--- lscolors-0.10.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ lscolors-0.10.0/Cargo.toml 2022-07-26T15:23:33.519910+00:00 +@@ -39,7 +39,7 @@ + optional = true + + [dependencies.crossterm] +-version = "0.23" ++version = "0.22" + optional = true + + [dev-dependencies.tempfile] diff --git a/rust-lscolors.spec b/rust-lscolors.spec index ecba319..57b5e82 100644 --- a/rust-lscolors.spec +++ b/rust-lscolors.spec @@ -1,41 +1,43 @@ -# Generated by rust2rpm 13 +# Generated by rust2rpm 22 %bcond_without check %global crate lscolors -Name: rust-%{crate} -Version: 0.7.1 +Name: rust-lscolors +Version: 0.10.0 Release: %autorelease Summary: Colorize paths using the LS_COLORS environment variable # Upstream license specification: MIT/Apache-2.0 -License: MIT or ASL 2.0 +License: MIT OR Apache-2.0 URL: https://crates.io/crates/lscolors Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * temporarily downgrade crossterm from 0.23 to 0.22 +Patch: lscolors-fix-metadata.diff ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Colorize paths using the LS_COLORS environment variable.} %description %{_description} -%if ! %{__cargo_skip_build} %package -n %{crate} Summary: %{summary} +# MIT OR Apache-2.0: lscolors 0.10.0 +# MIT: ansi_term 0.12.1 +License: MIT %description -n %{crate} %{_description} %files -n %{crate} -%license LICENSE-APACHE LICENSE-MIT +%license LICENSE-APACHE +%license LICENSE-MIT %doc README.md %{_bindir}/lscolors -%endif %package devel Summary: %{summary} @@ -43,13 +45,14 @@ 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 -%license LICENSE-APACHE LICENSE-MIT -%doc README.md -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE-APACHE +%license %{crate_instdir}/LICENSE-MIT +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -57,11 +60,11 @@ 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 %package -n %{name}+ansi_term-devel Summary: %{summary} @@ -69,11 +72,23 @@ BuildArch: noarch %description -n %{name}+ansi_term-devel %{_description} -This package contains library source intended for building other packages -which use "ansi_term" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "ansi_term" feature of the "%{crate}" crate. %files -n %{name}+ansi_term-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+crossterm-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+crossterm-devel %{_description} + +This package contains library source intended for building other packages which +use the "crossterm" feature of the "%{crate}" crate. + +%files -n %{name}+crossterm-devel +%ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 diff --git a/sources b/sources index 7808583..8c1c301 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (lscolors-0.7.1.crate) = 65c618c25624b360a98f98142e0867d524d19e7060887993f35899a26a812e360d8b8d627d36a72fa3c604a1cb5615d6a425850087183b694083b9649e120776 +SHA512 (lscolors-0.10.0.crate) = 2ff4b1234cb42128f9eb53e3a35484ccde51621292c61ca6ff5442e6f5a343a3dfebafa9f2ba45f7bc3e2211f152e629e6812b786f53d277791555b67a4e3cd8