|
|
@ -9,39 +9,39 @@ download = wget --no-check-certificate -t3 -T60 -c -P $(DL_DIR) |
|
|
|
WGET_DOWNLOAD = wget --no-check-certificate -t3 -T60 -c -P |
|
|
|
|
|
|
|
define DOWNLOAD |
|
|
|
$(call MESSAGE,"Downloading") |
|
|
|
$(foreach hook,$($(PKG)_PRE_DOWNLOAD_HOOKS),$(call $(hook))$(sep)) |
|
|
|
$(Q)( \
|
|
|
|
if [ "$($(PKG)_VER)" == "git" ]; then \
|
|
|
|
$(call MESSAGE,"Downloading") ; \
|
|
|
|
$(GET-GIT-SOURCE) $($(PKG)_SITE)/$($(PKG)_SOURCE) $(DL_DIR)/$($(PKG)_SOURCE); \
|
|
|
|
else \
|
|
|
|
if [ ! -f $(DL_DIR)/$($(PKG)_SOURCE) ]; then \
|
|
|
|
$(call MESSAGE,"Downloading") ; \
|
|
|
|
elif [ "$($(PKG)_VER)" == "svn" ]; then \
|
|
|
|
$(GET-SVN-SOURCE) $($(PKG)_SITE)/$($(PKG)_SOURCE) $(DL_DIR)/$($(PKG)_SOURCE); \
|
|
|
|
elif [ ! -f $(DL_DIR)/$(1) ]; then \
|
|
|
|
$(WGET_DOWNLOAD) $(DL_DIR) $($(PKG)_SITE)/$(1); \
|
|
|
|
fi; \
|
|
|
|
fi; \
|
|
|
|
) |
|
|
|
$(foreach hook,$($(PKG)_POST_DOWNLOAD_HOOKS),$(call $(hook))$(sep)) |
|
|
|
endef |
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
# unpack archives into build directory
|
|
|
|
define EXTRACT |
|
|
|
# unpack archives into given directory
|
|
|
|
define EXTRACT # (directory)
|
|
|
|
@$(call MESSAGE,"Extracting") |
|
|
|
$(foreach hook,$($(PKG)_PRE_EXTRACT_HOOKS),$(call $(hook))$(sep)) |
|
|
|
$(Q)( \
|
|
|
|
case $($(PKG)_SOURCE) in \
|
|
|
|
*.tar | *.tar.bz2 | *.tbz | *.tar.gz | *.tgz | *.tar.xz | *.txz) \
|
|
|
|
tar -xf ${DL_DIR}/$($(PKG)_SOURCE) -C ${1}; \
|
|
|
|
tar -xf ${DL_DIR}/$($(PKG)_SOURCE) -C $(1); \
|
|
|
|
;; \
|
|
|
|
*.zip) \
|
|
|
|
unzip -o -q ${DL_DIR}/$($(PKG)_SOURCE) -d ${1}; \
|
|
|
|
unzip -o -q ${DL_DIR}/$($(PKG)_SOURCE) -d $(1); \
|
|
|
|
;; \
|
|
|
|
*.git) \
|
|
|
|
cp -a -t ${1} $(DL_DIR)/$($(PKG)_SOURCE); \
|
|
|
|
if test -z $($(PKG)_CHECKOUT); then \
|
|
|
|
$(call MESSAGE,"use original head"); \
|
|
|
|
else \
|
|
|
|
cp -a -t $(1) $(DL_DIR)/$($(PKG)_SOURCE); \
|
|
|
|
if test $($(PKG)_CHECKOUT); then \
|
|
|
|
$(call MESSAGE,"git checkout $($(PKG)_CHECKOUT)"); \
|
|
|
|
$(CD) ${1}/$($(PKG)_DIR); git checkout -q $($(PKG)_CHECKOUT); \
|
|
|
|
$(CD) $(1)/$($(PKG)_DIR); git checkout $($(PKG)_CHECKOUT); \
|
|
|
|
fi; \
|
|
|
|
;; \
|
|
|
|
*) \
|
|
|
@ -49,6 +49,7 @@ define EXTRACT |
|
|
|
false ;; \
|
|
|
|
esac \
|
|
|
|
) |
|
|
|
$(foreach hook,$($(PKG)_POST_EXTRACT_HOOKS),$(call $(hook))$(sep)) |
|
|
|
endef |
|
|
|
|
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|