## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 4; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # 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 # Manually created patch for downstream crate metadata changes Patch: lz4-sys-fix-metadata.diff # 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; remaining changes to Cargo.toml are applied # with “rust2rpm -p” and appear in lz4-sys-fix-metadata.diff. 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 ## START: Generated by rpmautospec * Fri Jan 26 2024 Fedora Release Engineering - 1.9.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Thu Jan 04 2024 Benjamin A. Beasley - 1.9.4-3 - Split up the system-liblz4 patch - Apply the changes in Cargo.toml during “rust2rpm -p” * Thu Jan 04 2024 Benjamin A. Beasley - 1.9.4-1 - Initial package (close RHBZ#2249863) ## END: Generated by rpmautospec