net-irc/limnoria: use HTTPS for GitHub and HOMEPAGE
[gentoo.git] / eclass / gnome.org.eclass
1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 # @ECLASS: gnome.org.eclass
5 # @MAINTAINER:
6 # gnome@gentoo.org
7 # @AUTHOR:
8 # Authors: Spidler <spidler@gentoo.org> with help of carparski.
9 # eclass variable additions and documentation: Gilles Dartiguelongue <eva@gentoo.org>
10 # @BLURB: Helper eclass for gnome.org hosted archives
11 # @DESCRIPTION:
12 # Provide a default SRC_URI for tarball hosted on gnome.org mirrors.
13
14 inherit versionator
15
16 # @ECLASS-VARIABLE: GNOME_TARBALL_SUFFIX
17 # @DESCRIPTION:
18 # Most projects hosted on gnome.org mirrors provide tarballs as tar.bz2 or
19 # tar.xz. This eclass defaults to bz2 for EAPI 0, 1, 2, 3 and defaults to xz for
20 # everything else. This is because the gnome mirrors are moving to only have xz
21 # tarballs for new releases.
22 if has "${EAPI:-0}" 0 1 2 3; then
23         : ${GNOME_TARBALL_SUFFIX:="bz2"}
24 else
25         : ${GNOME_TARBALL_SUFFIX:="xz"}
26 fi
27
28 # Even though xz-utils are in @system, they must still be added to DEPEND; see
29 # https://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml
30 if [[ ${GNOME_TARBALL_SUFFIX} == "xz" ]]; then
31         DEPEND="${DEPEND} app-arch/xz-utils"
32 fi
33
34 # @ECLASS-VARIABLE: GNOME_ORG_MODULE
35 # @DESCRIPTION:
36 # Name of the module as hosted on gnome.org mirrors.
37 # Leave unset if package name matches module name.
38 : ${GNOME_ORG_MODULE:=$PN}
39
40 # @ECLASS-VARIABLE: GNOME_ORG_PVP
41 # @INTERNAL
42 # @DESCRIPTION:
43 # Major and minor numbers of the version number.
44 : ${GNOME_ORG_PVP:=$(get_version_component_range 1-2)}
45
46 SRC_URI="mirror://gnome/sources/${GNOME_ORG_MODULE}/${GNOME_ORG_PVP}/${GNOME_ORG_MODULE}-${PV}.tar.${GNOME_TARBALL_SUFFIX}"
47
48 S="${WORKDIR}/${GNOME_ORG_MODULE}-${PV}"