# Generated by rust2rpm 28 # * Nearly all tests require data files from tests/data, which are not included # in the crate. This is fortunate, as many of these files are pre-compiled # executables that we would prefer not to redistribute, even in the source # RPMs, since we can’t be 100% sure of their provenance and licensing. Even # files that aren’t executables would have required care with respect to # licensing. There are a handful of tests that we could run without these data # files, but they are not worth the bother. %bcond check 0 %global debug_package %{nil} %global crate lzma-rust2 Name: rust-lzma-rust2 Version: 0.15.2 Release: %autorelease Summary: LZMA / LZMA2 / LZIP / XZ compression ported from 'tukaani xz for java' License: Apache-2.0 URL: https://crates.io/crates/lzma-rust2 Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * Patch out benchmark-only criterion dev-dependency # * Patch out liblzma dev-dependency, not packaged and nontrivial, used for # benchmarks and some tests Patch: lzma-rust2-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 BuildRequires: dos2unix %global _description %{expand: LZMA / LZMA2 / LZIP / XZ compression ported from 'tukaani xz for java'.} %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}/CHANGELOG.md %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}+crc-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+crc-devel %{_description} This package contains library source intended for building other packages which use the "crc" feature of the "%{crate}" crate. %files -n %{name}+crc-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+encoder-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+encoder-devel %{_description} This package contains library source intended for building other packages which use the "encoder" feature of the "%{crate}" crate. %files -n %{name}+encoder-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+lzip-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+lzip-devel %{_description} This package contains library source intended for building other packages which use the "lzip" feature of the "%{crate}" crate. %files -n %{name}+lzip-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+optimization-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+optimization-devel %{_description} This package contains library source intended for building other packages which use the "optimization" feature of the "%{crate}" crate. %files -n %{name}+optimization-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+sha2-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+sha2-devel %{_description} This package contains library source intended for building other packages which use the "sha2" feature of the "%{crate}" crate. %files -n %{name}+sha2-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}+xz-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+xz-devel %{_description} This package contains library source intended for building other packages which use the "xz" feature of the "%{crate}" crate. %files -n %{name}+xz-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 # Fix CRLF line terminations find . -type f -exec dos2unix --keepdate '{}' '+' %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %changelog %autochangelog