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
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-02-14 13:44:22 +01:00
parent 970160a316
commit fea18a3f0d

View file

@ -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