recipetool: create: support extracting SUMMARY and HOMEPAGE

Allow plugins to set any variable value through the extravalues dict,
and use this to support extracting SUMMARY and HOMEPAGE values from spec
files included with the source; additionally translate "License:" to a
comment next to the LICENSE field (we have our own logic for setting
LICENSE, but it will often be useful to see what the spec file says if
one is present).

Also use the same mechanism for setting the same variables for node.js
modules; this was already supported but wasn't inserting the settings in
the appropriate place in the file which this will now do.

(From OE-Core rev: 91fc35ff5e89aa6d4c4ad945e45406fb4f71018e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton
2016-05-30 10:20:59 +12:00
committed by Richard Purdie
parent c056dad62c
commit 2b510f5e01
3 changed files with 54 additions and 36 deletions

View File

@@ -104,9 +104,9 @@ class NpmRecipeHandler(RecipeHandler):
classes.append('npm')
handled.append('buildsystem')
if 'description' in data:
lines_before.append('SUMMARY = "%s"' % data['description'])
extravalues['SUMMARY'] = data['description']
if 'homepage' in data:
lines_before.append('HOMEPAGE = "%s"' % data['homepage'])
extravalues['HOMEPAGE'] = data['homepage']
# Shrinkwrap
localfilesdir = tempfile.mkdtemp(prefix='recipetool-npm')