add support for flagging packages
[openwrt/staging/yousong.git] / include / package-defaults.mk
index e7d74b1ae122b1a1204e2fcd99dcd86768af39fe..1d29119d81fab0aba0a8f3eab81c430ae99000af 100644 (file)
@@ -23,7 +23,16 @@ define Package/Default
   else
     VERSION:=$(PKG_RELEASE)
   endif
-  PKGARCH:=$(BOARD)
+  ifneq ($(PKG_FLAGS),)
+    PKGFLAGS:=$(PKG_FLAGS)
+  else
+    PKGFLAGS:=
+  endif
+  ifneq ($(ARCH_PACKAGES),)
+    PKGARCH:=$(ARCH_PACKAGES)
+  else
+    PKGARCH:=$(BOARD)
+  endif
   PRIORITY:=optional
   DEFAULT:=
   MENU:=
@@ -33,12 +42,13 @@ define Package/Default
   KCONFIG:=
   BUILDONLY:=
   URL:=
+  VARIANT:=
 endef
 
 Build/Patch:=$(Build/Patch/Default)
 ifneq ($(strip $(PKG_UNPACK)),)
   define Build/Prepare/Default
-       $(PKG_UNPACK)
+       $(SH_FUNC) $(PKG_UNPACK)
        $(Build/Patch)
   endef
 endif
@@ -61,7 +71,8 @@ CONFIGURE_ARGS = \
                --mandir=$(CONFIGURE_PREFIX)/man \
                --infodir=$(CONFIGURE_PREFIX)/info \
                $(DISABLE_NLS) \
-               $(DISABLE_LARGEFILE)
+               $(DISABLE_LARGEFILE) \
+               $(DISABLE_IPV6)
 
 CONFIGURE_VARS = \
                $(TARGET_CONFIGURE_OPTS) \
@@ -84,8 +95,7 @@ define Build/Configure/Default
                $(2) \
                $(CONFIGURE_CMD) \
                $(CONFIGURE_ARGS) \
-               $(1) \
-               $(DISABLE_IPV6); \
+               $(1); \
        fi; \
        )
 endef
@@ -108,7 +118,7 @@ MAKE_PATH = .
 
 define Build/Compile/Default
        $(MAKE_VARS) \
-       $(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
+       $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
                $(MAKE_FLAGS) \
                $(1);
 endef
@@ -117,7 +127,7 @@ define Build/Install/Default
        $(MAKE_VARS) \
        $(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
                $(MAKE_INSTALL_FLAGS) \
-               $(1) install;
+               $(if $(1), $(1), install);
 endef
 
 define Build/Dist/Default