summary is like description, but not multiline

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Gnatenko 2017-02-18 00:11:04 +01:00
parent 1282937913
commit e880b5031d

View file

@ -71,7 +71,12 @@ TEMPLATE = """# Generated by rust2rpm
Name: {{ name }}
Version: {{ md.version }}
Release: 1%{?dist}
Summary: {{ md.description|default("# FIXME") }}
{% if md.description is none %}
Summary: # FIXME
{% else %}
{% set description_lines = md.description.split("\n") %}
Summary: {{ description_lines|join(" ")|trim }}
{% endif %}
License: {{ md.license|default("# FIXME") }}
URL: https://crates.io/crates/{{ md.name }}
@ -118,7 +123,14 @@ Conflicts: {{ con }}
{% endif %}
%description {{ name_devel }}
{% if md.description is none %}
%{summary}.
{% else %}
{{ md.description|wordwrap|trim }}
{% endif %}
This package contains library source intended for building other packages
which use %{crate} from crates.io.
{% endif %}
%prep