diff --git a/.gitignore b/.gitignore index d00b0b8..dd18ef1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /fd-lock-2.0.0.crate +/fd-lock-3.0.10.crate diff --git a/fd-lock-fix-metadata-auto.diff b/fd-lock-fix-metadata-auto.diff new file mode 100644 index 0000000..7ba123a --- /dev/null +++ b/fd-lock-fix-metadata-auto.diff @@ -0,0 +1,13 @@ +--- fd-lock-3.0.10/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ fd-lock-3.0.10/Cargo.toml 2023-02-25T03:30:49.571470+00:00 +@@ -44,10 +44,3 @@ + version = "0.36.0" + features = ["fs"] + +-[target."cfg(windows)".dependencies.windows-sys] +-version = "0.45.0" +-features = [ +- "Win32_Foundation", +- "Win32_Storage_FileSystem", +- "Win32_System_IO", +-] diff --git a/rust-fd-lock.spec b/rust-fd-lock.spec index da6914b..eb1a680 100644 --- a/rust-fd-lock.spec +++ b/rust-fd-lock.spec @@ -1,27 +1,21 @@ -# Generated by rust2rpm 17 +# Generated by rust2rpm 24 %bcond_without check %global debug_package %{nil} %global crate fd-lock -Name: rust-%{crate} -Version: 2.0.0 +Name: rust-fd-lock +Version: 3.0.10 Release: %autorelease Summary: Advisory cross-platform lock on a file using a file descriptor to it -# Upstream license specification: MIT OR Apache-2.0 -License: MIT or ASL 2.0 +License: MIT OR Apache-2.0 URL: https://crates.io/crates/fd-lock Source: %{crates_source} -# Drop windows dependencies -Patch0: fd-lock-fix-metadata.diff +# Automatically generated patch to strip foreign dependencies +Patch: fd-lock-fix-metadata-auto.diff -ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif - -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Advisory cross-platform lock on a file using a file descriptor to it.} @@ -34,13 +28,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} @@ -48,11 +43,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 %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 diff --git a/sources b/sources index dfe5705..73afbcf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fd-lock-2.0.0.crate) = 2bf33b4091f9553d54d1e9e2f9d7dcb03e33edf6515641370160396244349f04d144a613d776dc1b94fb223af04b6e3032ef959a45941315fdcd3659bdd80238 +SHA512 (fd-lock-3.0.10.crate) = fb4bee2949cfded340c6b950a3ef5a9cf0688d0a9c8bf05b158f8b833e7fbb8a2db34448e00c7860834473cde32af0ba39a7b2b2008dfeaa92c02f30be395ddb