From owner-svn-doc-all@FreeBSD.ORG Fri Apr 11 16:46:10 2014 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF317BDF; Fri, 11 Apr 2014 16:46:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB8981260; Fri, 11 Apr 2014 16:46:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3BGkAQ9037384; Fri, 11 Apr 2014 16:46:10 GMT (envelope-from mat@svn.freebsd.org) Received: (from mat@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3BGkArk037383; Fri, 11 Apr 2014 16:46:10 GMT (envelope-from mat@svn.freebsd.org) Message-Id: <201404111646.s3BGkArk037383@svn.freebsd.org> From: Mathieu Arnold Date: Fri, 11 Apr 2014 16:46:10 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r44535 - head/en_US.ISO8859-1/books/porters-handbook/makefiles X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2014 16:46:10 -0000 Author: mat (ports committer) Date: Fri Apr 11 16:46:10 2014 New Revision: 44535 URL: http://svnweb.freebsd.org/changeset/doc/44535 Log: Add a bit about USE_GITHUB. Sponsored by: Absolight Modified: head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Modified: head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Fri Apr 11 16:09:56 2014 (r44534) +++ head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Fri Apr 11 16:46:10 2014 (r44535) @@ -1754,6 +1754,119 @@ MASTER_SITE_SUBDIR= stardict/WyabdcRealP + + + <varname>USE_GITHUB</varname> + + If the distribution file comes from a specific commit or + tag on GitHub + for which there is no officially released file, there is an + easy way to set the right DISTNAME and + MASTER_SITES automatically. These + variables are available: + + + <varname>USE_GITHUB</varname> Description + + + + + Variable + Description + Default + Mandatory + + + + + + GH_ACCOUNT + Account name of the GitHub user hosting the + project + none + Mandatory + + + + GH_PROJECT + Name of the project on GitHub + ${PORTNAME} + + + + + GH_TAGNAME + Name of the tag to download (2.0.1, hash, ...) + Using the name of a branch here is incorrect. It is + possible to do + GH_TAGNAME=${GH_COMMIT} to do a + snapshot + ${DISTVERSION} + + + + GH_COMMIT + first 7 digits of the commit that generated + GH_TAGNAME (see + git-describe(1)) + none + Mandatory + + + +
+ + + Simple Use of <varname>USE_GITHUB</varname> + + While trying to make a port for version + 1.2.7 of pkg + from the &os; user on github, at , The + Makefile would end up looking like + this (slightly stripped for the example): + + PORTNAME= pkg +PORTVERSION= 1.2.7 + +USE_GITHUB= yes +GH_ACCOUNT= freebsd +GH_COMMIT= f53e577 + + It will automatically have + MASTER_SITES set to GH + GHC and WRKSRC to + ${WRKDIR}/freebsd-pkg-f53e577. + + + + More Complete Use of + <varname>USE_GITHUB</varname> + + While trying to make a port for the bleeding edge + version of pkg from the &os; + user on github, at , The + Makefile would end up looking like + this (slightly stripped for the example): + + PORTNAME= pkg-devel +PORTVERSION= 1.3.0.a.20140411 + +USE_GITHUB= yes +GH_ACCOUNT= freebsd +GH_PROJECT= pkg +GH_TAGNAME= ${GH_COMMIT} +GH_COMMIT= 6dbb17b + + It will automatically have + MASTER_SITES set to GH + GHC and WRKSRC to + ${WRKDIR}/freebsd-pkg-6dbb17b. + + +