diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d59992d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/zstd-0.5.1+zstd.1.4.4.crate diff --git a/rust-zstd.spec b/rust-zstd.spec new file mode 100644 index 0000000..81c0e67 --- /dev/null +++ b/rust-zstd.spec @@ -0,0 +1,141 @@ +# Generated by rust2rpm 12 +# Tests require files not included in crate +%bcond_with check +%global debug_package %{nil} + +%global crate zstd +%global upstream_version 0.5.1+zstd.1.4.4 + +Name: rust-%{crate} +Version: 0.5.1 +Release: 1%{?dist} +Summary: Binding for the zstd compression library + +# Upstream license specification: MIT +License: MIT +URL: https://crates.io/crates/zstd +Source: %{crates_source %{crate} %{upstream_version}} +# Initial patched metadata +# * Remove zstd version from version field +# * Remove bindgen feature as it is now the default to build with system zstd +Patch0: zstd-fix-metadata.diff + +ExclusiveArch: %{rust_arches} +%if %{__cargo_skip_build} +BuildArch: noarch +%endif + +BuildRequires: rust-packaging + +%global _description %{expand: +Binding for the zstd compression library.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages +which use "%{crate}" crate. + +%files devel +%license LICENSE +%doc Readme.md +%{cargo_registry}/%{crate}-%{version_no_tilde}/ + +%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 "default" feature of "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+futures-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+futures-devel %{_description} + +This package contains library source intended for building other packages +which use "futures" feature of "%{crate}" crate. + +%files -n %{name}+futures-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+legacy-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+legacy-devel %{_description} + +This package contains library source intended for building other packages +which use "legacy" feature of "%{crate}" crate. + +%files -n %{name}+legacy-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+tokio-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+tokio-devel %{_description} + +This package contains library source intended for building other packages +which use "tokio" feature of "%{crate}" crate. + +%files -n %{name}+tokio-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+tokio-io-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+tokio-io-devel %{_description} + +This package contains library source intended for building other packages +which use "tokio-io" feature of "%{crate}" crate. + +%files -n %{name}+tokio-io-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%package -n %{name}+wasm-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+wasm-devel %{_description} + +This package contains library source intended for building other packages +which use "wasm" feature of "%{crate}" crate. + +%files -n %{name}+wasm-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{upstream_version} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +* Mon Dec 16 06:14:56 CET 2019 Robert-André Mauchin - 0.5.1-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..bece7cf --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (zstd-0.5.1+zstd.1.4.4.crate) = 565a3898c24eb5efac75df6b76d327ce8a2e62f261e63c4e307ad8583604333d9e3ba6567b3d83c7eb771a1117b743e594dacfe3fdf7542800da921ec0ebef2d diff --git a/zstd-fix-metadata.diff b/zstd-fix-metadata.diff new file mode 100644 index 0000000..3f1702d --- /dev/null +++ b/zstd-fix-metadata.diff @@ -0,0 +1,19 @@ +--- zstd-0.5.1+zstd.1.4.4/Cargo.toml 2019-11-05T19:48:37+00:00 ++++ zstd-0.5.1+zstd.1.4.4/Cargo.toml 2020-01-08T20:16:14.429503+00:00 +@@ -13,7 +13,7 @@ + [package] + edition = "2018" + name = "zstd" +-version = "0.5.1+zstd.1.4.4" ++version = "0.5.1" + authors = ["Alexandre Bury "] + exclude = ["assets/**"] + description = "Binding for the zstd compression library." +@@ -52,7 +52,6 @@ + version = "2.2" + + [features] +-bindgen = ["zstd-safe/bindgen"] + default = ["legacy"] + legacy = ["zstd-safe/legacy"] + tokio = ["tokio-io", "futures"]