Use separate lines for each file in %doc/%license

Fixes #187.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-07-05 14:21:40 +02:00
parent c18514544e
commit 4436a110cf

View file

@ -100,13 +100,15 @@ Requires: {{ req }}
%files -n %{crate}
{% if license_files|length > 0 %}
%license {{ license_files|join(' ') }}
{% for file in license_files %}
%license {{ file }}
{% endfor %}
{% else %}
# FIXME: no license files detected
{% endif %}
{% if doc_files|length > 0 %}
%doc {{ doc_files|join(' ') }}
{% endif %}
{% for file in doc_files %}
%doc {{ file }}
{% endfor %}
{% for bin in bins %}
%{_bindir}/{{ bin.name }}
{% endfor %}
@ -160,13 +162,13 @@ use {% if feature is not none %}the "{{ feature }}" feature of {% endif %}the "%
%files {{ pkg }}
{% if feature is none %}
{% if license_files|length > 0 %}
{% if relative_license_paths %}
%license {{ license_files|join(' ') }}
{% else %}
{% for file in license_files %}
{% for file in license_files %}
{% if relative_license_paths %}
%license {{ file }}
{% else %}
%license %{crate_instdir}/{{ file }}
{% endfor %}
{% endif %}
{% endif %}
{% endfor %}
{% else %}
# FIXME: no license files detected
{% endif %}