diff --git a/rust2rpm/__main__.py b/rust2rpm/__main__.py index 56d6784..9b10bfd 100644 --- a/rust2rpm/__main__.py +++ b/rust2rpm/__main__.py @@ -71,7 +71,7 @@ TEMPLATE = """# Generated by rust2rpm Name: {{ name }} Version: {{ md.version }} Release: 1%{?dist} -Summary: # FIXME +Summary: {{ md.description|default("# FIXME") }} License: {{ md.license|default("# FIXME") }} URL: https://crates.io/crates/{{ md.name }} diff --git a/rust2rpm/metadata.py b/rust2rpm/metadata.py index 29cfc01..b53e95d 100644 --- a/rust2rpm/metadata.py +++ b/rust2rpm/metadata.py @@ -39,6 +39,7 @@ class Metadata(object): self.name = None self.license = None self.license_file = None + self.description = None self._version = None self._targets = [] self._provides = [] @@ -57,6 +58,7 @@ class Metadata(object): self.name = md["name"] self.license = md["license"] self.license_file = md["license_file"] + self.description = md.get("description") self._version = semver.SpecItem("={}".format(md["version"])) # Targets