Browse Source

- buildsystem-helpers: allow ni-git handling

master
vanhofen 3 years ago
parent
commit
39d84a4b6a
  1. 12
      make/buildsystem-helpers.mk

12
make/buildsystem-helpers.mk

@ -28,7 +28,10 @@ download = $(GET_ARCHIVE) $(DL_DIR)
define DOWNLOAD define DOWNLOAD
$(foreach hook,$($(PKG)_PRE_DOWNLOAD_HOOKS),$(call $(hook))$(sep)) $(foreach hook,$($(PKG)_PRE_DOWNLOAD_HOOKS),$(call $(hook))$(sep))
$(Q)( \ $(Q)( \
if [ "$($(PKG)_VERSION)" == "git" ]; then \ if [ "$($(PKG)_VERSION)" == "ni-git" ]; then \
$(call MESSAGE,"Downloading") ; \
$(GET_GIT_SOURCE) $($(PKG)_SITE)/$($(PKG)_SOURCE) $(SOURCE_DIR)/$($(PKG)_SOURCE); \
elif [ "$($(PKG)_VERSION)" == "git" ]; then \
$(call MESSAGE,"Downloading") ; \ $(call MESSAGE,"Downloading") ; \
$(GET_GIT_SOURCE) $($(PKG)_SITE)/$($(PKG)_SOURCE) $(DL_DIR)/$($(PKG)_SOURCE); \ $(GET_GIT_SOURCE) $($(PKG)_SITE)/$($(PKG)_SOURCE) $(DL_DIR)/$($(PKG)_SOURCE); \
elif [ "$($(PKG)_VERSION)" == "hg" ]; then \ elif [ "$($(PKG)_VERSION)" == "hg" ]; then \
@ -59,6 +62,13 @@ define EXTRACT # (directory)
*.zip) \ *.zip) \
unzip -o -q ${DL_DIR}/$($(PKG)_SOURCE) -d $(1); \ unzip -o -q ${DL_DIR}/$($(PKG)_SOURCE) -d $(1); \
;; \ ;; \
ni-git.*) \
cp -a -t $(1) $(SOURCE_DIR)/$($(PKG)_SOURCE); \
if test $($(PKG)_CHECKOUT); then \
$(call MESSAGE,"git checkout $($(PKG)_CHECKOUT)"); \
$(CD) $(1)/$($(PKG)_DIR); git checkout $($(PKG)_CHECKOUT); \
fi; \
;; \
*.git | git.*) \ *.git | git.*) \
cp -a -t $(1) $(DL_DIR)/$($(PKG)_SOURCE); \ cp -a -t $(1) $(DL_DIR)/$($(PKG)_SOURCE); \
if test $($(PKG)_CHECKOUT); then \ if test $($(PKG)_CHECKOUT); then \

Loading…
Cancel
Save