You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rust-zstd-sys/rust-zstd-sys.spec

242 lines
6.7 KiB

# Generated by rust2rpm 26
%bcond_without check
%global debug_package %{nil}
%global crate zstd-sys
%global upstream_version 2.0.13+zstd.1.5.6
Name: rust-zstd-sys
Version: 2.0.13
Release: %autorelease
Summary: Low-level bindings for the zstd compression library
# Upstream license specification: MIT/Apache-2.0
License: MIT OR Apache-2.0
URL: https://crates.io/crates/zstd-sys
Source: %{crates_source %{crate} %{upstream_version}}
# Automatically generated patch to strip dependencies and normalize metadata
Patch: zstd-sys-fix-metadata-auto.diff
# Manually created patch for downstream crate metadata changes
# * make bindgen build-dependency non-optional
# * fix logic for included / excluded files
# * exclude files that are only useful for upstream development
Patch: zstd-sys-fix-metadata.diff
# * unconditionally use bindgen and pkg-config to link against system libzstd
Patch10: 0001-unconditionally-use-bindgen-and-pkg-config-to-link-a.patch
BuildRequires: cargo-rpm-macros >= 24
BuildRequires: pkgconfig(libzstd)
%global _description %{expand:
Low-level bindings for the zstd compression library.}
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
Requires: pkgconfig(libzstd)
%description devel %{_description}
This package contains library source intended for building other packages which
use the "%{crate}" crate.
%files devel
%license %{crate_instdir}/LICENSE
%license %{crate_instdir}/LICENSE.Apache-2.0
%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
%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}+fat-lto-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+fat-lto-devel %{_description}
This package contains library source intended for building other packages which
use the "fat-lto" feature of the "%{crate}" crate.
%files -n %{name}+fat-lto-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}+non-cargo-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+non-cargo-devel %{_description}
This package contains library source intended for building other packages which
use the "non-cargo" feature of the "%{crate}" crate.
%files -n %{name}+non-cargo-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}+std-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+std-devel %{_description}
This package contains library source intended for building other packages which
use the "std" feature of the "%{crate}" crate.
%files -n %{name}+std-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}+thin-lto-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+thin-lto-devel %{_description}
This package contains library source intended for building other packages which
use the "thin-lto" feature of the "%{crate}" crate.
%files -n %{name}+thin-lto-devel
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+zdict_builder-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+zdict_builder-devel %{_description}
This package contains library source intended for building other packages which
use the "zdict_builder" feature of the "%{crate}" crate.
%files -n %{name}+zdict_builder-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}-%{upstream_version} -p1
%cargo_prep
# * remove bundled zstd sources
rm -vr zstd/
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
%autochangelog