[package] appweb: rework extraction process (#7897)
authorFlorian Fainelli <florian@openwrt.org>
Tue, 7 Aug 2012 16:09:05 +0000 (16:09 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Tue, 7 Aug 2012 16:09:05 +0000 (16:09 +0000)
SVN-Revision: 33039

net/appweb/Makefile

index 2437761e7adace87ad6a7f48908a585346a42170..9652c96e1106d10e99b223943f1fcfc3aaba4d0b 100644 (file)
@@ -31,6 +31,28 @@ PKG_MD5SUM:=060d43c8194fa6a119cada966fc807a7
 
 include $(INCLUDE_DIR)/package.mk
 
+# The files in the .tar.gz are
+#    src/all/...
+#    src/build/...
+#    src/test/...
+# and so on
+#
+# What we want is
+#    $(PKG_BUILD_DIR)/all/...
+#    $(PKG_BUILD_DIR)/build/...
+#    $(PKG_BUILD_DIR)/test/...
+# and so on
+#
+# The following two lines make this happen
+#    1.  change tar option to strip out the top-level, src in
+#        this case
+#    2.  change the tar output to the build directory.  The
+#        original tar command was
+#        $(HOST_TAR) -C/.. $(1) $(TAR_OPTIONS)
+
+TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
+TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
+
 define Package/appweb
   SECTION:=net
   CATEGORY:=Network
@@ -63,10 +85,6 @@ CONFIGURE_ARGS += \
        --sslPort=8443 \
        --config=flat
 
-define Build/Prepare
-       tar xzf "$(DL_DIR)/$(PKG_SOURCE)" --strip-components 1 -C "$(PKG_BUILD_DIR)"
-endef
-
 define Build/Configure
        $(call Build/Configure/Default)
 endef