From patchwork Wed Dec 25 16:18:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 305130 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 986622C008F for ; Thu, 26 Dec 2013 03:19:11 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id EF256935C8; Wed, 25 Dec 2013 16:19:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jbbEqdpGinVQ; Wed, 25 Dec 2013 16:19:10 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 5C6CB93942; Wed, 25 Dec 2013 16:19:10 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id A52C31C22AC for ; Wed, 25 Dec 2013 16:19:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9FA49856CD for ; Wed, 25 Dec 2013 16:19:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gocr5SHLTuhd for ; Wed, 25 Dec 2013 16:19:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (top.free-electrons.com [176.31.233.9]) by whitealder.osuosl.org (Postfix) with ESMTP id 54BEB8565F for ; Wed, 25 Dec 2013 16:19:04 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id C1C33846; Wed, 25 Dec 2013 17:19:12 +0100 (CET) Received: from localhost (AReims-652-1-238-43.w83-198.abo.wanadoo.fr [83.198.181.43]) by mail.free-electrons.com (Postfix) with ESMTPSA id 57CB0147; Wed, 25 Dec 2013 17:19:12 +0100 (CET) From: Alexandre Belloni To: buildroot@busybox.net Date: Wed, 25 Dec 2013 17:18:58 +0100 Message-Id: <1387988339-17460-2-git-send-email-alexandre.belloni@free-electrons.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1387988339-17460-1-git-send-email-alexandre.belloni@free-electrons.com> References: <1387988339-17460-1-git-send-email-alexandre.belloni@free-electrons.com> Subject: [Buildroot] [PATCH 1/2] infra: introduce gitorious helper function X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Introduce a gitorious helper function to make it easy to retrieve gitorious packages without using git whose port is often blocked on enterprise networks. usage: $(eval $(call gitorious,project,repository)) Signed-off-by: Alexandre Belloni --- docs/manual/adding-packages-generic.txt | 10 +++++----- docs/manual/adding-packages-tips.txt | 18 ++++++++++++++++++ package/pkg-download.mk | 8 ++++++++ 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/docs/manual/adding-packages-generic.txt b/docs/manual/adding-packages-generic.txt index 14971b502ba9..d92e49bdcdc3 100644 --- a/docs/manual/adding-packages-generic.txt +++ b/docs/manual/adding-packages-generic.txt @@ -231,11 +231,11 @@ information is (assuming the package name is +libfoo+) : types for retrieving package tarballs. Git, Subversion, Mercurial, and Bazaar are supported URL types for retrieving packages directly from source code management systems. There is a helper function to make - it easier to download source tarballs from github (refer to - xref:github-download-url[] for details). A filesystem path may be used - to specify either a tarball or a directory containing the package - source code. See +LIBFOO_SITE_METHOD+ below for more details on how - retrieval works. + + it easier to download source tarballs from github or gitorious (refer + to xref:github-download-url[] and xref:gitorious-download-url[] for + details). A filesystem path may be used to specify either a tarball or + a directory containing the package source code. See + +LIBFOO_SITE_METHOD+ below for more details on how retrieval works. + Note that SCP URLs should be of the form +scp://[user@]host:filepath+, and that filepath is relative to the user's home directory, so you may want to prepend the path with a diff --git a/docs/manual/adding-packages-tips.txt b/docs/manual/adding-packages-tips.txt index 73c25be015ab..b51105eae9f2 100644 --- a/docs/manual/adding-packages-tips.txt +++ b/docs/manual/adding-packages-tips.txt @@ -55,3 +55,21 @@ FOO_SITE = $(call github,,,$(FOO_VERSION)) Buildroot (e.g.: +foo-f6fb6654af62045239caed5950bc6c7971965e60.tar.gz+), so it is not necessary to specify it in the +.mk+ file. - When using a commit ID as version, you should use the full 40 hex characters. + + +[[gitorious-download-url]] +How to add a package from gitorious +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +As with github, you can use the 'gitorious' helper function to download +tarballs from gitorious: + +------------------------ +FOO_VERSION = v1.0 # tag or full commit ID +$(eval $(call gitorious,,)) +------------------------ + +.Notes +- For host packages, use host-gitorious +- The FOO_VERSION can either be a tag or a commit ID. +- When using a commit ID as version, you should use the full 40 hex characters. diff --git a/package/pkg-download.mk b/package/pkg-download.mk index 758b211097e8..531df49b60f2 100644 --- a/package/pkg-download.mk +++ b/package/pkg-download.mk @@ -58,6 +58,14 @@ domainseparator=$(if $(1),$(1),/) # github(user,package,version): returns site of github repository github = https://github.com/$(1)/$(2)/tarball/$(3) +# gitorious(project,repo): sets _SITE and _SOURCE for a gitorious repository +define inner-gitorious +$(1)_SITE = https://gitorious.org/$(2)/$(3)/archive +$(1)_SOURCE = $($(1)_VERSION).tar.gz +endef +gitorious = $(call inner-gitorious,$(call UPPERCASE,$(call pkgname)),$(1),$(2)) +host-gitorious = $(call inner-gitorious,$(call UPPERCASE,host-$(call pkgname)),$(1),$(2)) + ################################################################################ # The DOWNLOAD_* helpers are in charge of getting a working copy # of the source repository for their corresponding SCM,