# Generated by rust2rpm 25 %bcond_without check %global debug_package %{nil} %global crate lz4-sys Name: rust-lz4-sys Version: 1.9.4 Release: %autorelease Summary: Rust LZ4 sys package License: MIT URL: https://crates.io/crates/lz4-sys Source0: %{crates_source} # Obtain the LICENSE file from the GitHub project, using the commit hash that # appears to correspond to the 1.9.4 release of the lz4-sys crate (and, as of # this writing, the last commit affecting the lz4-sys/ directory). # # The following PR would fix the missing license file in future crate releases: # # Add the LICENSE file to the lz4-sys crate # https://github.com/10XGenomics/lz4-rs/pull/40 Source1: https://github.com/10XGenomics/lz4-rs/raw/6c90cf846f3c112fa6c1e5fe6c94231a9882239b/LICENSE # Link system liblz4 when available # https://github.com/10XGenomics/lz4-rs/pull/39 # # Squashed (to omit reverted changes to the top-level Cargo.toml) and adjusted # to apply to the released crate. Patch: lz4-sys-1.9.4-system-liblz4.patch BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Rust LZ4 sys package.} %description %{_description} %package devel Summary: %{summary} BuildArch: noarch Requires: pkgconfig(liblz4) %description devel %{_description} This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel %license %{crate_instdir}/LICENSE %doc %{crate_instdir}/CHANGELOG.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 # Remove the bundled copy of liblz4. rm -rv liblz4 # Add the missing LICENSE file cp -p '%{SOURCE1}' . %cargo_prep %generate_buildrequires %cargo_generate_buildrequires echo 'pkgconfig(liblz4)' %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %changelog %autochangelog