clean up md5s() shell function
[openwrt/svn-archive/archive.git] / include / package.mk
index 74ad47874771d6152bc488741ffc21cf3792e6b9..e0f8c719f4cfe14af55fe587a4152c6e7472421f 100644 (file)
@@ -49,6 +49,7 @@ define Download/default
   URL:=$(PKG_SOURCE_URL)
   SUBDIR:=$(PKG_SOURCE_SUBDIR)
   PROTO:=$(PKG_SOURCE_PROTO)
+  $(if $(PKG_SOURCE_MIRROR),MIRROR:=$(filter 1,$(PKG_MIRROR)))
   VERSION:=$(PKG_SOURCE_VERSION)
   MD5SUM:=$(PKG_MD5SUM)
 endef
@@ -80,10 +81,12 @@ define Build/DefaultTargets
        $(foreach hook,$(Hooks/Compile/Pre),$(call $(hook))$(sep))
        $(Build/Compile)
        $(foreach hook,$(Hooks/Compile/Post),$(call $(hook))$(sep))
+       $(Build/Install)
+       $(foreach hook,$(Hooks/Install/Post),$(call $(hook))$(sep))
        touch $$@
 
   $(STAMP_INSTALLED): $(STAMP_BUILT)
-       $(SUBMAKE) clean-staging
+       $(SUBMAKE) -j1 clean-staging
        rm -rf $(TMP_DIR)/stage-$(PKG_NAME)
        mkdir -p $(TMP_DIR)/stage-$(PKG_NAME)/host $(STAGING_DIR)/packages $(STAGING_DIR_HOST)/packages
        $(call Build/InstallDev,$(TMP_DIR)/stage-$(PKG_NAME),$(TMP_DIR)/stage-$(PKG_NAME)/host)