diff options
Diffstat (limited to 'meta/classes-global')
| -rw-r--r-- | meta/classes-global/license.bbclass | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/meta/classes-global/license.bbclass b/meta/classes-global/license.bbclass index b2e0d3faba..d7c5d08a77 100644 --- a/meta/classes-global/license.bbclass +++ b/meta/classes-global/license.bbclass | |||
| @@ -18,8 +18,14 @@ LICENSE_CREATE_PACKAGE ??= "0" | |||
| 18 | LICENSE_PACKAGE_SUFFIX ??= "-lic" | 18 | LICENSE_PACKAGE_SUFFIX ??= "-lic" |
| 19 | LICENSE_FILES_DIRECTORY ??= "${datadir}/licenses/" | 19 | LICENSE_FILES_DIRECTORY ??= "${datadir}/licenses/" |
| 20 | 20 | ||
| 21 | LICENSE_DEPLOY_PATHCOMPONENT = "${SSTATE_PKGARCH}" | ||
| 22 | LICENSE_DEPLOY_PATHCOMPONENT:class-cross = "native" | ||
| 23 | LICENSE_DEPLOY_PATHCOMPONENT:class-native = "native" | ||
| 24 | # Ensure the *value* of SSTATE_PKGARCH is captured as it is used in the output paths | ||
| 25 | LICENSE_DEPLOY_PATHCOMPONENT[vardepvalue] += "${LICENSE_DEPLOY_PATHCOMPONENT}" | ||
| 26 | |||
| 21 | addtask populate_lic after do_patch before do_build | 27 | addtask populate_lic after do_patch before do_build |
| 22 | do_populate_lic[dirs] = "${LICSSTATEDIR}/${PN}" | 28 | do_populate_lic[dirs] = "${LICSSTATEDIR}/${LICENSE_DEPLOY_PATHCOMPONENT}/${PN}" |
| 23 | do_populate_lic[cleandirs] = "${LICSSTATEDIR}" | 29 | do_populate_lic[cleandirs] = "${LICSSTATEDIR}" |
| 24 | 30 | ||
| 25 | python do_populate_lic() { | 31 | python do_populate_lic() { |
| @@ -29,7 +35,7 @@ python do_populate_lic() { | |||
| 29 | lic_files_paths = find_license_files(d) | 35 | lic_files_paths = find_license_files(d) |
| 30 | 36 | ||
| 31 | # The base directory we wrangle licenses to | 37 | # The base directory we wrangle licenses to |
| 32 | destdir = os.path.join(d.getVar('LICSSTATEDIR'), d.getVar('SSTATE_PKGARCH'), d.getVar('PN')) | 38 | destdir = os.path.join(d.getVar('LICSSTATEDIR'), d.getVar('LICENSE_DEPLOY_PATHCOMPONENT'), d.getVar('PN')) |
| 33 | copy_license_files(lic_files_paths, destdir) | 39 | copy_license_files(lic_files_paths, destdir) |
| 34 | info = get_recipe_info(d) | 40 | info = get_recipe_info(d) |
| 35 | with open(os.path.join(destdir, "recipeinfo"), "w") as f: | 41 | with open(os.path.join(destdir, "recipeinfo"), "w") as f: |
