# Generated by rust2rpm 26 %bcond_without check %global debug_package %{nil} %global crate isal-sys %global upstream_version 0.5.3+496255c Name: rust-isal-sys Version: 0.5.3 Release: %autorelease Summary: Isa-l sys crate License: BSD-3-Clause URL: https://crates.io/crates/isal-sys Source: %{crates_source %{crate} %{upstream_version}} # Automatically generated patch to strip dependencies and normalize metadata Patch: isal-sys-fix-metadata-auto.diff # Manually created patch for downstream crate metadata changes # * Remove the static feature, and replace it with shared in the default # features # * Make bindgen non-optional Patch: isal-sys-fix-metadata.diff # * Downstream-only: always use the system isa-l shared library and regenerate # bindings Patch10: 0001-Downstream-only-always-use-the-system-isa-l-shared-l.patch BuildRequires: cargo-rpm-macros >= 24 BuildRequires: tomcli BuildRequires: isa-l-devel %global _description %{expand: Isa-l sys crate.} %description %{_description} %package devel Summary: %{summary} BuildArch: noarch Requires: isa-l-devel %description devel %{_description} This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel %license %{crate_instdir}/LICENSE %{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}+regenerate-bindings-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+regenerate-bindings-devel %{_description} This package contains library source intended for building other packages which use the "regenerate-bindings" feature of the "%{crate}" crate. %files -n %{name}+regenerate-bindings-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+shared-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+shared-devel %{_description} This package contains library source intended for building other packages which use the "shared" feature of the "%{crate}" crate. %files -n %{name}+shared-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+use-system-isal-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+use-system-isal-devel %{_description} This package contains library source intended for building other packages which use the "use-system-isal" feature of the "%{crate}" crate. %files -n %{name}+use-system-isal-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{upstream_version} -p1 # Remove the bundled copy of isa-l rm -rv isa-l # These would only be needed to build the bundled isa-l: tomcli set Cargo.toml del build-dependencies.cc tomcli set Cargo.toml del build-dependencies.copy_dir # To be more pedantically correct, replace the hard-coded /usr/include patched # into build.rs with the expansion of %%{_includedir}. sed -r -i 's@/usr/include\b@%{_includedir}@' build.rs %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %changelog %autochangelog