diff --git a/rust2rpm/templates/main.spec b/rust2rpm/templates/main.spec index 0f35cda..897a1d3 100644 --- a/rust2rpm/templates/main.spec +++ b/rust2rpm/templates/main.spec @@ -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 %}