luci.mk: expose option to override PKGARCH (#295)
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 18 Jan 2015 16:27:13 +0000 (17:27 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 18 Jan 2015 16:27:16 +0000 (17:27 +0100)
Also mark packages without src/ as arch independant by default.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
luci.mk

diff --git a/luci.mk b/luci.mk
index 81c08b9..0aba5c5 100644 (file)
--- a/luci.mk
+++ b/luci.mk
@@ -1,5 +1,5 @@
 #
 #
-# Copyright (C) 2008-2014 The LuCI Team <luci@lists.subsignal.org>
+# Copyright (C) 2008-2015 The LuCI Team <luci@lists.subsignal.org>
 #
 # This is free software, licensed under the Apache License, Version 2.0 .
 #
 #
 # This is free software, licensed under the Apache License, Version 2.0 .
 #
@@ -9,6 +9,7 @@ LUCI_TYPE?=$(word 2,$(subst -, ,$(LUCI_NAME)))
 LUCI_BASENAME?=$(patsubst luci-$(LUCI_TYPE)-%,%,$(LUCI_NAME))
 LUCI_LANGUAGES:=$(filter-out templates,$(notdir $(wildcard ${CURDIR}/po/*)))
 LUCI_DEFAULTS:=$(notdir $(wildcard ${CURDIR}/root/etc/uci-defaults/*))
 LUCI_BASENAME?=$(patsubst luci-$(LUCI_TYPE)-%,%,$(LUCI_NAME))
 LUCI_LANGUAGES:=$(filter-out templates,$(notdir $(wildcard ${CURDIR}/po/*)))
 LUCI_DEFAULTS:=$(notdir $(wildcard ${CURDIR}/root/etc/uci-defaults/*))
+LUCI_PKGARCH?=$(if $(realpath src/Makefile),,all)
 
 # Language code titles
 LUCI_LANG.ca=CatalĂ  (Catalan)
 
 # Language code titles
 LUCI_LANG.ca=CatalĂ  (Catalan)
@@ -80,6 +81,7 @@ define Package/$(PKG_NAME)
   SUBMENU:=$(if $(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.app))
   TITLE:=$(if $(LUCI_TITLE),$(LUCI_TITLE),LuCI $(LUCI_NAME) $(LUCI_TYPE))
   DEPENDS:=$(LUCI_DEPENDS)
   SUBMENU:=$(if $(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.$(LUCI_TYPE)),$(LUCI_MENU.app))
   TITLE:=$(if $(LUCI_TITLE),$(LUCI_TITLE),LuCI $(LUCI_NAME) $(LUCI_TYPE))
   DEPENDS:=$(LUCI_DEPENDS)
+  $(if $(LUCI_PKGARCH),PKGARCH:=$(LUCI_PKGARCH))
 endef
 
 ifneq ($(LUCI_DESCRIPTION),)
 endef
 
 ifneq ($(LUCI_DESCRIPTION),)
@@ -181,6 +183,7 @@ define LuciTranslation
     HIDDEN:=1
     DEFAULT:=LUCI_LANG_$(1)||ALL
     DEPENDS:=$(PKG_NAME)
     HIDDEN:=1
     DEFAULT:=LUCI_LANG_$(1)||ALL
     DEPENDS:=$(PKG_NAME)
+    PKGARCH:=all
   endef
 
   define Package/luci-i18n-$(LUCI_BASENAME)-$(1)/description
   endef
 
   define Package/luci-i18n-$(LUCI_BASENAME)-$(1)/description