/[gentoo-x86]/eclass/vcs-snapshot.eclass
Gentoo

Diff of /eclass/vcs-snapshot.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 Revision 1.3
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/vcs-snapshot.eclass,v 1.2 2012/03/19 08:52:49 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/vcs-snapshot.eclass,v 1.3 2012/06/07 21:51:48 mgorny Exp $
4 4
5# @ECLASS: vcs-snapshot.eclass 5# @ECLASS: vcs-snapshot.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# mgorny@gentoo.org 7# mgorny@gentoo.org
8# @BLURB: support eclass for VCS (github, bitbucket, gitweb) snapshots 8# @BLURB: support eclass for VCS (github, bitbucket, gitweb) snapshots
9# @DESCRIPTION: 9# @DESCRIPTION:
10# This eclass provides a convenience src_unpack() which does support 10# This eclass provides a convenience src_unpack() which does support
11# working with snapshots generated by various VCS-es. It unpacks those 11# working with snapshots generated by various VCS-es. It unpacks those
12# to ${S} rather than the original directory containing commit id. 12# to ${WORKDIR}/${P} rather than the original directory containing
13# the commit id.
13# 14#
14# Note that this eclass handles only unpacking. You need to specify 15# Note that this eclass handles only unpacking. You need to specify
15# SRC_URI yourself, and call any autoreconfiguration as necessary. 16# SRC_URI yourself, and call any autoreconfiguration as necessary.
16# The example does that using autotools-utils eclass. 17# The example does that using autotools-utils eclass.
17# 18#
39vcs-snapshot_src_unpack() { 40vcs-snapshot_src_unpack() {
40 default 41 default
41 42
42 # github, bitbucket: username-projectname-hash 43 # github, bitbucket: username-projectname-hash
43 # gitweb: projectname-tagname-hash 44 # gitweb: projectname-tagname-hash
44 mv *-*-[0-9a-f]*[0-9a-f]/ "${S}" || die 45 mv *-*-[0-9a-f]*[0-9a-f]/ "${WORKDIR}"/${P} || die
45} 46}

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.20