Browse Source

package/pkg-utils: add missing licensing data to show-info

While the list of licenses is present in the show-info output, the list
of license files and the redistributable status were missing. Add them.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Yann E. MORIN 1 year ago
parent
commit
5647d5c190
1 changed files with 4 additions and 0 deletions
  1. 4 0
      package/pkg-utils.mk

+ 4 - 0
package/pkg-utils.mk

@@ -157,6 +157,10 @@ endef
 define _json-info-pkg-details
 define _json-info-pkg-details
 	"version": $(call mk-json-str,$($(1)_DL_VERSION)),
 	"version": $(call mk-json-str,$($(1)_DL_VERSION)),
 	"licenses": $(call mk-json-str,$($(1)_LICENSE)),
 	"licenses": $(call mk-json-str,$($(1)_LICENSE)),
+	"license_files": [
+		$(foreach f, $($(1)_LICENSE_FILES),$(call mk-json-str,$(f))$(comma))
+	],
+	"redistributable": $(if $(filter NO,$($(1)_REDISTRIBUTE)),false,true),
 	"dl_dir": $(call mk-json-str,$($(1)_DL_SUBDIR)),
 	"dl_dir": $(call mk-json-str,$($(1)_DL_SUBDIR)),
 	"downloads": [
 	"downloads": [
 	$(foreach dl,$(sort $($(1)_ALL_DOWNLOADS)),
 	$(foreach dl,$(sort $($(1)_ALL_DOWNLOADS)),