From fea18a3f0d87ce68747f1c26a1e60a0188c1907f Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Feb 14 2022 13:09:28 +0000 Subject: Mark installed doc files as %doc I'm keeping this separate becuase it's logically a seperate change. In the -devel package, we installed the files once. I think it's nice to mark them as %doc, so that it shows up correctly when filtered by rpm attributes. After a mock build with the changes here: $ rpm -Vv -p /var/lib/mock/fedora-rawhide-x86_64/result/rust-rust-ini-devel-0.17.0-6.fc37.noarch.rpm ... missing /usr/share/cargo/registry/rust-ini-0.17.0 missing /usr/share/cargo/registry/rust-ini-0.17.0/.cargo-checksum.json missing /usr/share/cargo/registry/rust-ini-0.17.0/Cargo.toml missing l /usr/share/cargo/registry/rust-ini-0.17.0/LICENSE missing d /usr/share/cargo/registry/rust-ini-0.17.0/README.rst missing /usr/share/cargo/registry/rust-ini-0.17.0/examples missing /usr/share/cargo/registry/rust-ini-0.17.0/examples/test.rs missing /usr/share/cargo/registry/rust-ini-0.17.0/rustfmt.toml missing /usr/share/cargo/registry/rust-ini-0.17.0/src missing /usr/share/cargo/registry/rust-ini-0.17.0/src/lib.rs --- diff --git a/rust2rpm/templates/main.spec b/rust2rpm/templates/main.spec index 0799363..b6c19ff 100644 --- a/rust2rpm/templates/main.spec +++ b/rust2rpm/templates/main.spec @@ -170,6 +170,9 @@ use {% if feature is not none %}the "{{ feature }}" feature of {% endif %}the "% {% else %} # FIXME: no license files detected {% endif %} + {% for file in doc_files %} +%doc %{crate_instdir}/{{ file }} + {% endfor %} %{crate_instdir}/ {% else %} %ghost %{crate_instdir}/Cargo.toml