summaryrefslogtreecommitdiffstats
path: root/package/pkg-generic.mk
diff options
context:
space:
mode:
authorLuca Ceresoli <luca@lucaceresoli.net>2012-11-02 10:25:41 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2012-11-04 17:38:46 +0100
commit7c992ac3410e6694d8697b770eb3b0463b80a0a4 (patch)
treec542b986a70142ff6b5bf6fe412b2f26a92c8fa6 /package/pkg-generic.mk
parentc6917357ed6e7ce537f8277049a55440d5b4bb95 (diff)
downloadbuildroot-novena-7c992ac3410e6694d8697b770eb3b0463b80a0a4.tar.gz
buildroot-novena-7c992ac3410e6694d8697b770eb3b0463b80a0a4.zip
legal-info: split _LICENSE and _REDISTRIBUTE constants
Currently packages can be described in two ways: proprietary (tarball not saved, license not described in further detail), and others (tarball saved, license described). Split the logic to allow the license to be always described whether or not the source code can be redistributed. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/pkg-generic.mk')
-rw-r--r--package/pkg-generic.mk27
1 files changed, 18 insertions, 9 deletions
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index d3a6db609..6fcd359ee 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -276,6 +276,15 @@ ifndef $(2)_LICENSE_FILES
endif
endif
+ifndef $(2)_REDISTRIBUTE
+ ifdef $(3)_REDISTRIBUTE
+ $(2)_REDISTRIBUTE = $($(3)_REDISTRIBUTE)
+ endif
+endif
+
+$(2)_REDISTRIBUTE ?= YES
+
+
$(2)_DEPENDENCIES ?= $(filter-out $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
$(2)_INSTALL_STAGING ?= NO
@@ -445,29 +454,27 @@ $(2)_KCONFIG_VAR = BR2_PACKAGE_$(2)
endif
# legal-info: declare dependencies and set values used later for the manifest
-ifneq ($$($(2)_LICENSE),PROPRIETARY)
+ifneq ($$($(2)_LICENSE_FILES),)
+$(2)_MANIFEST_LICENSE_FILES = $$($(2)_LICENSE_FILES)
+endif
+$(2)_MANIFEST_LICENSE_FILES ?= not saved
+
+ifeq ($$($(2)_REDISTRIBUTE),YES)
ifneq ($$($(2)_SITE_METHOD),local)
ifneq ($$($(2)_SITE_METHOD),override)
# Packages that have a tarball need it downloaded and extracted beforehand
$(1)-legal-info: $(1)-extract $(REDIST_SOURCES_DIR)
$(2)_MANIFEST_TARBALL = $$($(2)_SOURCE)
-ifneq ($$($(2)_LICENSE_FILES),)
-$(2)_MANIFEST_LICENSE_FILES = $$($(2)_LICENSE_FILES)
endif
endif
endif
-endif
-# defaults for packages without tarball or license files
$(2)_MANIFEST_TARBALL ?= not saved
-$(2)_MANIFEST_LICENSE_FILES ?= not saved
# legal-info: produce legally relevant info.
$(1)-legal-info:
# Packages without a source are assumed to be part of Buildroot, skip them.
ifneq ($(call qstrip,$$($(2)_SOURCE)),)
-ifeq ($$($(2)_LICENSE),PROPRIETARY)
-# Proprietary packages: nothing to save
-else ifeq ($$($(2)_SITE_METHOD),local)
+ifeq ($$($(2)_SITE_METHOD),local)
# Packages without a tarball: don't save and warn
@$(call legal-warning-pkg-savednothing,$$($(2)_RAWNAME),local)
else ifeq ($$($(2)_SITE_METHOD),override)
@@ -483,10 +490,12 @@ else
$(call legal-license-file,$$($(2)_RAWNAME),$$$${F},$$($(2)_DIR)/$$$${F}); \
done
endif
+ifeq ($$($(2)_REDISTRIBUTE),YES)
# Copy the source tarball (just hardlink if possible)
@cp -l $(DL_DIR)/$$($(2)_SOURCE) $(REDIST_SOURCES_DIR) 2>/dev/null || \
cp $(DL_DIR)/$$($(2)_SOURCE) $(REDIST_SOURCES_DIR)
endif
+endif
@$(call legal-manifest,$$($(2)_RAWNAME),$$($(2)_VERSION),$$($(2)_LICENSE),$$($(2)_MANIFEST_LICENSE_FILES),$$($(2)_MANIFEST_TARBALL))
endif # ifneq ($(call qstrip,$$($(2)_SOURCE)),)
$(foreach hook,$($(2)_POST_LEGAL_INFO_HOOKS),$(call $(hook))$(sep))