# Generated by rust2rpm 22 %bcond_without check %global debug_package %{nil} %global crate zstd Name: rust-zstd0.9 Version: 0.9.2+zstd.1.5.1 Release: %autorelease Summary: Binding for the zstd compression library License: MIT URL: https://crates.io/crates/zstd Source0: %{crates_source} # Files used by the tests missing from the crate # Commit id is the v0.9.2 tag Source1: https://github.com/gyscos/zstd-rs/raw/d68228868929a5d76c800c65d1df0ee003c1c030/assets/example.txt Source2: https://github.com/gyscos/zstd-rs/raw/d68228868929a5d76c800c65d1df0ee003c1c030/assets/example.txt.zst Source3: https://github.com/gyscos/zstd-rs/raw/d68228868929a5d76c800c65d1df0ee003c1c030/assets/example.txt.v5.zst Source4: https://github.com/gyscos/zstd-rs/raw/d68228868929a5d76c800c65d1df0ee003c1c030/assets/example.txt.v6.zst Source5: https://github.com/gyscos/zstd-rs/raw/d68228868929a5d76c800c65d1df0ee003c1c030/assets/example.txt.v7.zst Source6: https://github.com/gyscos/zstd-rs/raw/d68228868929a5d76c800c65d1df0ee003c1c030/assets/example.txt.v8.zst Source10: https://github.com/gyscos/zstd-rs/raw/d68228868929a5d76c800c65d1df0ee003c1c030/zstd-safe/zstd-sys/src/bindings.rs # Manually created patch for downstream crate metadata changes # Upstream pins the zstd-safe version to 4.1.3, but zstd-safe, like this package # uses the semver build metadata field, which sorts as newer than x.y.z in rpm versioning. # Unpinning the version is easier than trying to unravel that mess. Patch: zstd-fix-metadata.diff ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging >= 21 %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 the "%{crate}" crate. %files devel %license LICENSE %doc 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 %package -n %{name}+arrays-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+arrays-devel %{_description} This package contains library source intended for building other packages which use the "arrays" feature of the "%{crate}" crate. %files -n %{name}+arrays-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+bindgen-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+bindgen-devel %{_description} This package contains library source intended for building other packages which use the "bindgen" feature of the "%{crate}" crate. %files -n %{name}+bindgen-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+debug-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+debug-devel %{_description} This package contains library source intended for building other packages which use the "debug" feature of the "%{crate}" crate. %files -n %{name}+debug-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+experimental-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+experimental-devel %{_description} This package contains library source intended for building other packages which use the "experimental" feature of the "%{crate}" crate. %files -n %{name}+experimental-devel %ghost %{crate_instdir}/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 the "legacy" feature of the "%{crate}" crate. %files -n %{name}+legacy-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+no_asm-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+no_asm-devel %{_description} This package contains library source intended for building other packages which use the "no_asm" feature of the "%{crate}" crate. %files -n %{name}+no_asm-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+pkg-config-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+pkg-config-devel %{_description} This package contains library source intended for building other packages which use the "pkg-config" feature of the "%{crate}" crate. %files -n %{name}+pkg-config-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+thin-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+thin-devel %{_description} This package contains library source intended for building other packages which use the "thin" feature of the "%{crate}" crate. %files -n %{name}+thin-devel %ghost %{crate_instdir}/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 the "wasm" feature of the "%{crate}" crate. %files -n %{name}+wasm-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+zstdmt-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+zstdmt-devel %{_description} This package contains library source intended for building other packages which use the "zstdmt" feature of the "%{crate}" crate. %files -n %{name}+zstdmt-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 mkdir -p assets cp "%{SOURCE1}" assets/ cp "%{SOURCE2}" assets/ cp "%{SOURCE3}" assets/ cp "%{SOURCE4}" assets/ cp "%{SOURCE5}" assets/ cp "%{SOURCE6}" assets/ mkdir -p zstd-safe/zstd-sys/src/ cp "%{SOURCE10}" zstd-safe/zstd-sys/src/ %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %changelog %autochangelog