| 1 |
eva |
1.11 |
# Copyright 1999-2011 Gentoo Foundation
|
| 2 |
spider |
1.1 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
nirbheek |
1.12 |
# $Header: /var/cvsroot/gentoo-x86/eclass/gnome.org.eclass,v 1.11 2011/03/18 07:58:09 eva Exp $
|
| 4 |
eva |
1.11 |
|
| 5 |
|
|
# @ECLASS: gnome.org.eclass
|
| 6 |
|
|
# @MAINTAINER:
|
| 7 |
|
|
# gnome@gentoo.org
|
| 8 |
vapier |
1.4 |
#
|
| 9 |
eva |
1.11 |
# @CODE@
|
| 10 |
|
|
# Authors: Spidler <spidler@gentoo.org> with help of carparski.
|
| 11 |
|
|
# eclass variable additions and documentation: Gilles Dartiguelongue <eva@gentoo.org>
|
| 12 |
|
|
# @CODE@
|
| 13 |
|
|
# @BLURB: Helper eclass for gnome.org hosted archives
|
| 14 |
|
|
# @DESCRIPTION:
|
| 15 |
|
|
# Provide a default SRC_URI for tarball hosted on gnome.org mirrors.
|
| 16 |
|
|
|
| 17 |
|
|
inherit versionator
|
| 18 |
|
|
|
| 19 |
|
|
# @ECLASS-VARIABLE: GNOME_TARBALL_SUFFIX
|
| 20 |
|
|
# @DESCRIPTION:
|
| 21 |
nirbheek |
1.12 |
# Most projects hosted on gnome.org mirrors provide tarballs as tar.bz2 or
|
| 22 |
|
|
# tar.xz. This eclass defaults to bz2 for EAPI 0, 1, 2, 3 and defaults to xz for
|
| 23 |
|
|
# everything else. This is because the gnome mirrors are moving to only have xz
|
| 24 |
|
|
# tarballs for new releases.
|
| 25 |
|
|
if has "${EAPI}" 0 1 2 3; then
|
| 26 |
|
|
: ${GNOME_TARBALL_SUFFIX:="bz2"}
|
| 27 |
|
|
else
|
| 28 |
|
|
: ${GNOME_TARBALL_SUFFIX:="xz"}
|
| 29 |
|
|
fi
|
| 30 |
eva |
1.11 |
|
| 31 |
|
|
# @ECLASS-VARIABLE: GNOME_ORG_MODULE
|
| 32 |
|
|
# @DESCRIPTION:
|
| 33 |
|
|
# Name of the module as hosted on gnome.org mirrors.
|
| 34 |
|
|
# Leave unset if package name matches module name.
|
| 35 |
|
|
: ${GNOME_ORG_MODULE:=$PN}
|
| 36 |
|
|
|
| 37 |
|
|
# @ECLASS-VARIABLE: GNOME_ORG_PVP
|
| 38 |
|
|
# @INTERNAL
|
| 39 |
|
|
# @DESCRIPTION:
|
| 40 |
|
|
# Major and minor numbers of the version number.
|
| 41 |
|
|
: ${GNOME_ORG_PVP:=$(get_version_component_range 1-2)}
|
| 42 |
spider |
1.1 |
|
| 43 |
eva |
1.11 |
SRC_URI="mirror://gnome/sources/${GNOME_ORG_MODULE}/${GNOME_ORG_PVP}/${GNOME_ORG_MODULE}-${PV}.tar.${GNOME_TARBALL_SUFFIX}"
|
| 44 |
spider |
1.1 |
|
| 45 |
eva |
1.11 |
S="${WORKDIR}/${GNOME_ORG_MODULE}-${PV}"
|