summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2010-12-27 21:33:46 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2010-12-27 21:33:46 +0100
commit48e9541fd5db34fce1de004805f3859b54d1eb89 (patch)
treeefdad20f2fed1c6cef712a56b99a6cff7a9a6446 /package
parentd4f63946c68da03da9fa9a316e194eede5af961a (diff)
parent960d268b25f61c407056c2eba946612a38d7de9f (diff)
downloadbuildroot-novena-48e9541fd5db34fce1de004805f3859b54d1eb89.tar.gz
buildroot-novena-48e9541fd5db34fce1de004805f3859b54d1eb89.zip
Merge branch 'for-2011.02/dl-tools' of git://git.busybox.net/~tpetazzoni/git/buildroot
Diffstat (limited to 'package')
-rw-r--r--package/Makefile.package.in53
1 files changed, 40 insertions, 13 deletions
diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index 816a01323..c4a1cf8ee 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -85,19 +85,21 @@ DL_DIR:=$(TOPDIR)/dl
endif
################################################################################
-# The DOWNLOAD_{GIT,SVN} helpers are in charge of getting a working copy of
-# the source repository for their corresponding SCM, checking out the requested
-# version / commit / tag, and create an archive out of it. DOWNLOAD_WGET is the
-# normal wget-based download mechanism.
+# The DOWNLOAD_{GIT,SVN,BZR} helpers are in charge of getting a
+# working copy of the source repository for their corresponding SCM,
+# checking out the requested version / commit / tag, and create an
+# archive out of it. DOWNLOAD_WGET is the normal wget-based download
+# mechanism.
#
-# The SOURCE_CHECK_{GIT,SVN,WGET} helpers are in charge of simply checking that
-# the source is available for download. This can be used to make sure one will
-# be able to get all the sources needed for one's build configuration.
+# The SOURCE_CHECK_{GIT,SVN,BZR,WGET} helpers are in charge of simply
+# checking that the source is available for download. This can be used
+# to make sure one will be able to get all the sources needed for
+# one's build configuration.
#
-# The SHOW_EXTERNAL_DEPS_{GIT,SVN,WGET} helpers simply output to the console
-# the names of the files that will be downloaded, or path and revision of the
-# source repositories, producing a list of all the "external dependencies" of
-# a given build configuration.
+# The SHOW_EXTERNAL_DEPS_{GIT,SVN,BZR,WGET} helpers simply output to
+# the console the names of the files that will be downloaded, or path
+# and revision of the source repositories, producing a list of all the
+# "external dependencies" of a given build configuration.
################################################################################
define DOWNLOAD_GIT
@@ -123,6 +125,20 @@ define SHOW_EXTERNAL_DEPS_GIT
endef
+define DOWNLOAD_BZR
+ test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
+ $(BZR) export $(DL_DIR)/$($(PKG)_SOURCE) $($(PKG)_SITE) -r $($(PKG)_DL_VERSION)
+endef
+
+define SOURCE_CHECK_BZR
+ $(BZR) ls --quiet $($(PKG)_SITE) > /dev/null
+endef
+
+define SHOW_EXTERNAL_DEPS_BZR
+ echo "$($(PKG)_SITE) [bzr: $($(PKG)_DL_VERSION)]"
+endef
+
+
define DOWNLOAD_SVN
test -e $(DL_DIR)/$($(PKG)_SOURCE) || \
(pushd $(DL_DIR) > /dev/null && \
@@ -175,6 +191,7 @@ define DOWNLOAD
case "$($(PKG)_SITE_METHOD)" in \
git) $($(DL_MODE)_GIT) && exit ;; \
svn) $($(DL_MODE)_SVN) && exit ;; \
+ bzr) $($(DL_MODE)_BZR) && exit ;; \
*) $(call $(DL_MODE)_WGET,$(1),$(2)) && exit ;; \
esac ; \
fi ; \
@@ -487,9 +504,19 @@ $$($(2)_TARGET_DIRCLEAN): PKG=$(2)
# configuration
ifeq ($$(BR2_PACKAGE_$(2)),y)
+
TARGETS += $(1)
-endif
-endef
+
+ifeq ($$($(2)_SITE_METHOD),svn)
+DL_TOOLS_DEPENDENCIES += svn
+else ifeq ($$($(2)_SITE_METHOD),git)
+DL_TOOLS_DEPENDENCIES += git
+else ifeq ($$($(2)_SITE_METHOD),bzr)
+DL_TOOLS_DEPENDENCIES += bzr
+endif # SITE_METHOD
+
+endif # BR2_PACKAGE_$(2)
+endef # GENTARGETS_INNER
################################################################################
# GENTARGETS -- the target generator macro for generic packages