build: when staging unstripped package files, install them to a temporary directory first to work around file overwrite issues in packages like asterisk

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17477 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Felix Fietkau 2009-09-02 19:01:09 +00:00
parent 7d61bbe743
commit a014ef6f93
1 changed files with 5 additions and 3 deletions

View File

@ -59,9 +59,11 @@ ifeq ($(DUMP),)
$(eval $(call BuildIPKGVariable,$(1),postrm)) $(eval $(call BuildIPKGVariable,$(1),postrm))
$(STAGING_DIR_ROOT)/stamp/.$(1)_installed: $(STAMP_BUILT) $(STAGING_DIR_ROOT)/stamp/.$(1)_installed: $(STAMP_BUILT)
mkdir -p $(STAGING_DIR_ROOT)/stamp mkdir -p $(STAGING_DIR_ROOT)/stamp $(STAGING_DIR_ROOT)/tmp-$(1)
$(call Package/$(1)/install,$(STAGING_DIR_ROOT)) $(call Package/$(1)/install,$(STAGING_DIR_ROOT)/tmp-$(1))
$(call Package/$(1)/install_lib,$(STAGING_DIR_ROOT)) $(call Package/$(1)/install_lib,$(STAGING_DIR_ROOT)/tmp-$(1))
$(CP) $(STAGING_DIR_ROOT)/tmp-$(1)/* $(STAGING_DIR_ROOT)/
rm -rf $(STAGING_DIR_ROOT)/tmp-$(1)
touch $$@ touch $$@
$$(IPKG_$(1)): $(STAGING_DIR)/etc/ipkg.conf $(STAMP_BUILT) $$(IPKG_$(1)): $(STAGING_DIR)/etc/ipkg.conf $(STAMP_BUILT)