generate %doc statements
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
0dc9fc182e
commit
561280a0ea
2 changed files with 8 additions and 0 deletions
|
@ -140,6 +140,7 @@ class Metadata(object):
|
|||
self.name = None
|
||||
self.license = None
|
||||
self.license_file = None
|
||||
self.readme = None
|
||||
self.description = None
|
||||
self.version = None
|
||||
self._targets = []
|
||||
|
@ -156,6 +157,7 @@ class Metadata(object):
|
|||
self.name = md["name"]
|
||||
self.license = md["license"]
|
||||
self.license_file = md["license_file"]
|
||||
self.readme = md["readme"]
|
||||
self.description = md.get("description")
|
||||
self.version = md["version"]
|
||||
version = "={}".format(self.version)
|
||||
|
|
|
@ -137,6 +137,9 @@ which use %{crate} from crates.io.
|
|||
{% if md.license_file is not none %}
|
||||
%license {{ md.license_file }}
|
||||
{% endif %}
|
||||
{% if md.readme is not none %}
|
||||
%doc {{ md.readme }}
|
||||
{% endif %}
|
||||
{% for bin in bins %}
|
||||
%{_bindir}/{{ bin.name }}
|
||||
{% endfor %}
|
||||
|
@ -147,6 +150,9 @@ which use %{crate} from crates.io.
|
|||
{% if md.license_file is not none %}
|
||||
%license {{ md.license_file }}
|
||||
{% endif %}
|
||||
{% if md.readme is not none %}
|
||||
%doc {{ md.readme }}
|
||||
{% endif %}
|
||||
%{cargo_registry}/%{crate}-%{version}/
|
||||
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue