diff --git a/package/pkg-luarocks.mk b/package/pkg-luarocks.mk index aa83e74a0e..08ea9b801a 100644 --- a/package/pkg-luarocks.mk +++ b/package/pkg-luarocks.mk @@ -44,12 +44,15 @@ $(2)_SITE ?= $$(call qstrip,$$(BR2_LUAROCKS_MIRROR)) $(2)_DEPENDENCIES += host-luarocks luainterpreter # -# Extract step +# Extract step. Extract into a temporary dir and move the relevant part to the +# source dir. # ifndef $(2)_EXTRACT_CMDS define $(2)_EXTRACT_CMDS - cd $$($(2)_DIR)/.. && \ + mkdir -p $$($(2)_DIR)/luarocks-extract + cd $$($(2)_DIR)/luarocks-extract && \ $$(LUAROCKS_RUN_ENV) $$(LUAROCKS_RUN_CMD) unpack --force $$(DL_DIR)/$$($(2)_SOURCE) + mv $$($(2)_DIR)/luarocks-extract/*/* $$($(2)_DIR) endef endif