Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Custom extract command agian agian
@ 2011-05-10 11:34 Allan W. Nielsen
  2011-05-10 11:34 ` [Buildroot] [PATCH] Makefile.package.in: Makes it possible to override the default extract commands Allan W. Nielsen
  0 siblings, 1 reply; 11+ messages in thread
From: Allan W. Nielsen @ 2011-05-10 11:34 UTC (permalink / raw)
  To: buildroot

Sorry for the mess... (I tested in the wrong repos....)

Here is a proposal which only have one stamp file and is tested.

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [Buildroot] [PATCH] Makefile.package.in: Makes it possible to override the default extract commands
@ 2011-05-19  6:25 a at awn.dk
  0 siblings, 0 replies; 11+ messages in thread
From: a at awn.dk @ 2011-05-19  6:25 UTC (permalink / raw)
  To: buildroot

From: Allan W. Nielsen <a@awn.dk>

When using GENTARGETS (or macroes depending on it), there is no way of
specifying a custom extraction procedure. When using the patch one can
simply define $(PACKAGE_NAME)_EXTRACT_CMDS which will override the
default. If non is defined it will fall back to the default extract
procedure.

An example could look like this:

FGLRX_VERSION=11-3
FGLRX_SOURCE:=ati-driver-installer-$(FGLRX_VERSION)-x86.x86_64.run
FGLRX_SITE:=http://www2.ati.com/drivers/linux/

define FGLRX_EXTRACT_CMDS
	sh $(DL_DIR)/$(FGLRX_SOURCE) --extract $(@D)
endef

$(eval $(call GENTARGETS,package,fglrx))

Signed-off-by: Allan W. Nielsen <a@awn.dk>
---
 package/Makefile.package.in |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index bf4e1b4..16981b7 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -243,8 +243,7 @@ endif
 $(BUILD_DIR)/%/.stamp_extracted:
 	@$(call MESSAGE,"Extracting")
 	$(Q)mkdir -p $(@D)
-	$(Q)$(if $($(PKG)_SOURCE),$(INFLATE$(suffix $($(PKG)_SOURCE))) $(DL_DIR)/$($(PKG)_SOURCE) | \
-	$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $(@D) $(TAR_OPTIONS) -)
+	$($(PKG)_EXTRACT_CMDS)
 # some packages have messed up permissions inside
 	$(Q)chmod -R ug+rw $(@D)
 	$(foreach hook,$($(PKG)_POST_EXTRACT_HOOKS),$(call $(hook))$(sep))
@@ -425,6 +424,10 @@ $(2)_TARGET_UNINSTALL =		$$($(2)_DIR)/.stamp_uninstalled
 $(2)_TARGET_CLEAN =		$$($(2)_DIR)/.stamp_cleaned
 $(2)_TARGET_DIRCLEAN =		$$($(2)_DIR)/.stamp_dircleaned
 
+# default extract command
+$(2)_EXTRACT_CMDS ?= $(if $$($(2)_SOURCE),$$(INFLATE$$(suffix $$($(2)_SOURCE))) $(DL_DIR)/$$($(2)_SOURCE) | \
+	$(TAR) $(TAR_STRIP_COMPONENTS)=1 -C $$($(2)_DIR) $(TAR_OPTIONS) -)
+
 # post-steps hooks
 $(2)_POST_EXTRACT_HOOKS         ?=
 $(2)_POST_PATCH_HOOKS           ?=
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [Buildroot] Custom extract command again
@ 2011-05-10  9:58 Allan W. Nielsen
  2011-05-10  9:58 ` [Buildroot] [PATCH] Makefile.package.in: Makes it possible to override the default extract commands Allan W. Nielsen
  0 siblings, 1 reply; 11+ messages in thread
From: Allan W. Nielsen @ 2011-05-10  9:58 UTC (permalink / raw)
  To: buildroot

New version implemented as suggested by Thomas Petazzoni

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [Buildroot] Custom extract command again
@ 2011-05-10  9:55 Allan W. Nielsen
  2011-05-10  9:55 ` [Buildroot] [PATCH] Makefile.package.in: Makes it possible to override the default extract commands Allan W. Nielsen
  0 siblings, 1 reply; 11+ messages in thread
From: Allan W. Nielsen @ 2011-05-10  9:55 UTC (permalink / raw)
  To: buildroot

New patch which based on the implementation sugegsted by Thomas
Petazzoni

--
Allan W. Nielsen

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [Buildroot] New version of patch to provide custom extract procedures
@ 2011-04-11 11:08 Allan W. Nielsen
  2011-04-11 11:08 ` [Buildroot] [PATCH] Makefile.package.in: Makes it possible to override the default extract commands Allan W. Nielsen
  0 siblings, 1 reply; 11+ messages in thread
From: Allan W. Nielsen @ 2011-04-11 11:08 UTC (permalink / raw)
  To: buildroot

As I wrote earier, here is a new more clean patch to
Makefile.package.in which makes it possible to define custom extract
procedures. After suggestion from Daniel Nystr?m I have included a
simple example in the commit message

--
Allan W. Nielsen

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-05-19  6:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-10 11:34 [Buildroot] Custom extract command agian agian Allan W. Nielsen
2011-05-10 11:34 ` [Buildroot] [PATCH] Makefile.package.in: Makes it possible to override the default extract commands Allan W. Nielsen
2011-05-10 18:43   ` Thomas Petazzoni
2011-05-16 19:52     ` Thomas Petazzoni
2011-05-18 14:39       ` Allan Nielsen
2011-05-18 15:27         ` Thomas Petazzoni
2011-05-18 16:05           ` Allan Nielsen
  -- strict thread matches above, loose matches on Subject: below --
2011-05-19  6:25 a at awn.dk
2011-05-10  9:58 [Buildroot] Custom extract command again Allan W. Nielsen
2011-05-10  9:58 ` [Buildroot] [PATCH] Makefile.package.in: Makes it possible to override the default extract commands Allan W. Nielsen
2011-05-10  9:55 [Buildroot] Custom extract command again Allan W. Nielsen
2011-05-10  9:55 ` [Buildroot] [PATCH] Makefile.package.in: Makes it possible to override the default extract commands Allan W. Nielsen
2011-04-11 11:08 [Buildroot] New version of patch to provide custom extract procedures Allan W. Nielsen
2011-04-11 11:08 ` [Buildroot] [PATCH] Makefile.package.in: Makes it possible to override the default extract commands Allan W. Nielsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox