aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ebuild.template2
-rw-r--r--src/main.rs6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/ebuild.template b/src/ebuild.template
index 9611332..bbaf69e 100644
--- a/src/ebuild.template
+++ b/src/ebuild.template
@@ -11,7 +11,7 @@ DESCRIPTION="{description}"
HOMEPAGE="{homepage}"
SRC_URI="$(cargo_crate_uris ${{CRATES}})"
RESTRICT="mirror"
-LICENSE=""
+LICENSE="{license}" # Update to proper Gentoo format
SLOT="0"
KEYWORDS="~amd64"
IUSE=""
diff --git a/src/main.rs b/src/main.rs
index 5dc8bc8..297aea7 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -68,6 +68,11 @@ fn real_main(options: Options, config: &Config) -> CliResult<Option<()>> {
.cloned()
.unwrap_or_else(|| String::from("")));
+ let license = metadata.license
+ .as_ref()
+ .cloned()
+ .unwrap_or_else(|| String::from("unknown license"));
+
// build up the ebuild path
let ebuild_path = PathBuf::from(format!("{}-{}.ebuild", package.name(), package.version()));
@@ -86,6 +91,7 @@ fn real_main(options: Options, config: &Config) -> CliResult<Option<()>> {
include_str!("ebuild.template"),
description = desc.trim(),
homepage = homepage.trim(),
+ license = license.trim(),
crates = crates.join(""),
cargo_ebuild_ver = env!("CARGO_PKG_VERSION"),
)