From patchwork Thu Jan 31 08:18:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [2/2] Add $(PKG_NAME) in name of downloaded patches Date: Wed, 30 Jan 2013 22:18:30 -0000 From: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 217123 Message-Id: <1359620310-13640-2-git-send-email-jezz@sysmic.org> To: buildroot@busybox.net Cc: "Yann E. MORIN" , =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= Until now, patch was downloaded without be renamed. $(DL_DIR) quickly become a mess. Downloaded patches are now named $(PKG_NAME)-$(PKG_VERSION)-$(PKG_PATCH_FILENAME). Signed-off-by: Jérôme Pouiller --- package/pkg-generic.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index fbc2bb9..f2bf40a 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -42,8 +42,8 @@ endif $(if $($(PKG)_SOURCE),$(call DOWNLOAD,$($(PKG)_SITE)/$($(PKG)_SOURCE))) $(foreach p,$($(PKG)_PATCH),\ $(if $(findstring ://,$(p)),\ - $(call DOWNLOAD,$(p)),\ - $(call DOWNLOAD,$($(PKG)_SITE)/$(p))\ + $(call DOWNLOAD,$(p),$($(PKG)_NAME)-$($(PKG)_VERSION)-$(notdir $(p))),\ + $(call DOWNLOAD,$($(PKG)_SITE)/$(p),$($(PKG)_NAME)-$($(PKG)_VERSION)-$(notdir $(p)))\ )\ $(sep)) $(foreach hook,$($(PKG)_POST_DOWNLOAD_HOOKS),$(call $(hook))$(sep)) @@ -90,7 +90,8 @@ $(BUILD_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION) $(BUILD_DIR)/%/.stamp_patched: @$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$(RAWNAME)") $(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep)) - $(foreach p,$($(PKG)_PATCH),support/scripts/apply-patches.sh $(@D) $(DL_DIR) $(notdir $(p))$(sep)) + $(foreach p,$($(PKG)_PATCH),\ + support/scripts/apply-patches.sh $(@D) $(DL_DIR) $($(PKG)_NAME)-$($(PKG)_VERSION)-$(notdir $(p))$(sep)) $(Q)( \ if test -d $($(PKG)_DIR_PREFIX)/$(RAWNAME); then \ if test "$(wildcard $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER)*.patch*)"; then \