diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9071420 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/fd-lock-3.0.13.crate diff --git a/README.md b/README.md deleted file mode 100644 index 110f080..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-fd-lock3 - -The rust-fd-lock3 package diff --git a/fd-lock-fix-metadata-auto.diff b/fd-lock-fix-metadata-auto.diff new file mode 100644 index 0000000..a8c31b6 --- /dev/null +++ b/fd-lock-fix-metadata-auto.diff @@ -0,0 +1,13 @@ +--- fd-lock-3.0.13/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ fd-lock-3.0.13/Cargo.toml 2024-01-03T10:41:15.657863+00:00 +@@ -44,10 +44,3 @@ + version = "0.38.0" + features = ["fs"] + +-[target."cfg(windows)".dependencies.windows-sys] +-version = "0.48.0" +-features = [ +- "Win32_Foundation", +- "Win32_Storage_FileSystem", +- "Win32_System_IO", +-] diff --git a/rust-fd-lock3.spec b/rust-fd-lock3.spec new file mode 100644 index 0000000..48065be --- /dev/null +++ b/rust-fd-lock3.spec @@ -0,0 +1,71 @@ +# Generated by rust2rpm 25 +%bcond_without check +%global debug_package %{nil} + +%global crate fd-lock + +Name: rust-fd-lock3 +Version: 3.0.13 +Release: %autorelease +Summary: Advisory cross-platform lock on a file using a file descriptor to it + +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/fd-lock +Source: %{crates_source} +# Automatically generated patch to strip dependencies and normalize metadata +Patch: fd-lock-fix-metadata-auto.diff + +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +Advisory cross-platform lock on a file using a file descriptor to it.} + +%description %{_description} + +%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}/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 + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..c198d61 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (fd-lock-3.0.13.crate) = 34ffaac90749e3da728da7d28fa0e72b3b5137076451d51a9d2e630f2240a424be3924413c02b3c7ac0ff218ce073bfdc096d77c61427d9f1a19009307e92a18