# Generated by rust2rpm 28 %bcond check 1 %global debug_package %{nil} %global crate docx-rs Name: rust-docx-rs Version: 0.4.19 Release: %autorelease Summary: A .docx file writer with Rust/WebAssembly License: MIT URL: https://crates.io/crates/docx-rs Source: %{crates_source} # Manually created patch for downstream crate metadata changes # * remove examples that requires media files Patch: docx-rs-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: A .docx file writer with Rust/WebAssembly.} %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}/ %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}+image-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+image-devel %{_description} This package contains library source intended for building other packages which use the "image" feature of the "%{crate}" crate. %files -n %{name}+image-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 # * skip all tests from reader module as they require a fixture of binary blobs # that is not present in the crate. %{cargo_test -- -- %{shrink: --skip read_bom --skip read_bookmark --skip read_comment --skip read_comment_in_delete_in_insert --skip read_decoration --skip read_extended_comment --skip read_footnotes --skip read_from_doc --skip read_hello --skip read_highlight_and_underline --skip read_history --skip read_indent_word_online --skip read_insert_table --skip read_line_spacing --skip read_lvl_override --skip read_numbering --skip read_tab_and_break --skip read_table_docx --skip read_table_merged_libre_office --skip read_textbox }} %endif %changelog %autochangelog