public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog golang-vcs-snapshot.eclass
@ 2015-08-05 15:42 William Hubbs (williamh)
  0 siblings, 0 replies; 2+ messages in thread
From: William Hubbs (williamh) @ 2015-08-05 15:42 UTC (permalink / raw
  To: gentoo-commits

williamh    15/08/05 15:42:55

  Modified:             ChangeLog
  Added:                golang-vcs-snapshot.eclass
  Log:
  Add eclass for vcs snapshots of software written in Go.

Revision  Changes    Path
1.1745               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1745&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1745&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1744&r2=1.1745

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1744
retrieving revision 1.1745
diff -u -r1.1744 -r1.1745
--- ChangeLog	3 Aug 2015 18:31:41 -0000	1.1744
+++ ChangeLog	5 Aug 2015 15:42:55 -0000	1.1745
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1744 2015/08/03 18:31:41 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1745 2015/08/05 15:42:55 williamh Exp $
+
+  05 Aug 2015; William Hubbs <williamh@gentoo.org> +golang-vcs-snapshot.eclass:
+  Add eclass for vcs snapshots of software written in Go.
 
   03 Aug 2015; Michael Sterrett <mr_bones_@gentoo.org> python-utils-r1.eclass:
   Add quotes to support reading from files with spaces in the filename.



1.1                  eclass/golang-vcs-snapshot.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/golang-vcs-snapshot.eclass?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/golang-vcs-snapshot.eclass?rev=1.1&content-type=text/plain

Index: golang-vcs-snapshot.eclass
===================================================================
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/golang-vcs-snapshot.eclass,v 1.1 2015/08/05 15:42:55 williamh Exp $

# @ECLASS: golang-vcs-snapshot.eclass
# @MAINTAINER:
# William Hubbs <williamh@gentoo.org>
# @BLURB: support eclass for unpacking VCS snapshot tarballs for
# software written in the Go programming language
# @DESCRIPTION:
# This eclass provides a convenience src_unpack() which unpacks the
# first tarball mentioned in SRC_URI to its appropriate location in
# ${WORKDIR}/${P}, treating ${WORKDIR}/${P} as a go workspace.
#
# The location where the tarball is extracted is defined as
# ${WORKDIR}/${P}/src/${EGO_PN}.
#
# The typical use case is VCS snapshots coming from github, bitbucket
# and similar services.
#
# Please note that this eclass currently handles only tarballs
# (.tar.gz), but support for more formats may be added in the future.
#
# @EXAMPLE:
#
# @CODE
# EGO_PN=github.com/user/package
# inherit golang-vcs-snapshot
#
# SRC_URI="http://github.com/example/${PN}/tarball/v${PV} -> ${P}.tar.gz"
# @CODE
#
# The above example will extract the tarball to
# ${WORKDIR}/${P}/src/github.com/user/package

inherit golang-base

case ${EAPI:-0} in
	5) ;;
	*) die "${ECLASS} API in EAPI ${EAPI} not yet established."
esac

EXPORT_FUNCTIONS src_unpack

# @FUNCTION: golang-vcs-snapshot_src_unpack
# @DESCRIPTION:
# Extract the first archive from ${A} to the appropriate location for GOPATH.
golang-vcs-snapshot_src_unpack() {
	local x
	ego_pn_check
	set -- ${A}
	x="$1"
		mkdir -p "${WORKDIR}/${P}/src/${EGO_PN%/*}"
	tar -C "${WORKDIR}/${P}/src/${EGO_PN%/*}" -x --strip-components 1 \
		-f "${DISTDIR}/${x}" || die
}





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog golang-vcs-snapshot.eclass
@ 2015-08-05 19:23 William Hubbs (williamh)
  0 siblings, 0 replies; 2+ messages in thread
From: William Hubbs (williamh) @ 2015-08-05 19:23 UTC (permalink / raw
  To: gentoo-commits

williamh    15/08/05 19:23:28

  Modified:             ChangeLog golang-vcs-snapshot.eclass
  Log:
  add || die and fix indentation

Revision  Changes    Path
1.1746               eclass/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1746&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1746&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1745&r2=1.1746

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1745
retrieving revision 1.1746
diff -u -r1.1745 -r1.1746
--- ChangeLog	5 Aug 2015 15:42:55 -0000	1.1745
+++ ChangeLog	5 Aug 2015 19:23:28 -0000	1.1746
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1745 2015/08/05 15:42:55 williamh Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1746 2015/08/05 19:23:28 williamh Exp $
+
+  05 Aug 2015; William Hubbs <williamh@gentoo.org> golang-vcs-snapshot.eclass:
+  add || die and fix indentation
 
   05 Aug 2015; William Hubbs <williamh@gentoo.org> +golang-vcs-snapshot.eclass:
   Add eclass for vcs snapshots of software written in Go.



1.2                  eclass/golang-vcs-snapshot.eclass

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/golang-vcs-snapshot.eclass?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/golang-vcs-snapshot.eclass?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/golang-vcs-snapshot.eclass?r1=1.1&r2=1.2

Index: golang-vcs-snapshot.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/golang-vcs-snapshot.eclass,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- golang-vcs-snapshot.eclass	5 Aug 2015 15:42:55 -0000	1.1
+++ golang-vcs-snapshot.eclass	5 Aug 2015 19:23:28 -0000	1.2
@@ -1,6 +1,6 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/golang-vcs-snapshot.eclass,v 1.1 2015/08/05 15:42:55 williamh Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/golang-vcs-snapshot.eclass,v 1.2 2015/08/05 19:23:28 williamh Exp $
 
 # @ECLASS: golang-vcs-snapshot.eclass
 # @MAINTAINER:
@@ -50,7 +50,7 @@
 	ego_pn_check
 	set -- ${A}
 	x="$1"
-		mkdir -p "${WORKDIR}/${P}/src/${EGO_PN%/*}"
+	mkdir -p "${WORKDIR}/${P}/src/${EGO_PN%/*}" || die
 	tar -C "${WORKDIR}/${P}/src/${EGO_PN%/*}" -x --strip-components 1 \
 		-f "${DISTDIR}/${x}" || die
 }





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-05 19:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-05 19:23 [gentoo-commits] gentoo-x86 commit in eclass: ChangeLog golang-vcs-snapshot.eclass William Hubbs (williamh)
  -- strict thread matches above, loose matches on Subject: below --
2015-08-05 15:42 William Hubbs (williamh)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox