# Generated by rust2rpm 27 %bcond check 1 %global debug_package %{nil} %global crate spm_precompiled Name: rust-spm_precompiled Version: 0.1.4 Release: %autorelease Summary: SentencePiece's DoubleArray and its Normalizer, implemented in Rust License: Apache-2.0 URL: https://crates.io/crates/spm_precompiled Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * Fix spelling error in crate description. # * Upgrade base64 dep to 0.22 as in PR #4: # https://github.com/huggingface/spm_precompiled/pull/4 Patch: spm_precompiled-fix-metadata.diff # * PR #4 upgrades the base64 dependency: # https://github.com/huggingface/spm_precompiled/pull/4 # * Only apply the code changes since crates.io modifies Cargo.toml) # * https://github.com/huggingface/spm_precompiled/commit/a0a1806b09f6146d433957c2e09f9f90c9b2c3da.diff Patch2: a0a1806b09f6146d433957c2e09f9f90c9b2c3da.diff BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: This crate aims to emulate https://github.com/google/sentencepiece Dart::DoubleArray struct and its Normalizer. This crate is highly specialized and not intended for general use.} %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 %{crate_instdir}/LICENSE %doc %{crate_instdir}/README.md %{crate_instdir}/ %exclude %{crate_instdir}/test.json %exclude %{crate_instdir}/src/tests.rs %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 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %changelog %autochangelog