1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
4 # @ECLASS: mate-desktop.org.eclass
8 # Authors: NP-Hardass <NP-Hardass@gentoo.org> based upon the gnome.org eclass.
10 # @BLURB: Helper eclass for mate-desktop.org hosted archives
12 # Provide a default SRC_URI and EGIT_REPO_URI for MATE packages as well as
13 # exporting some useful values like the MATE_BRANCH
15 # EAPIs < 6 are banned.
18 *) die "EAPI=${EAPI:-0} is not supported" ;;
21 if [[ ${PV} == 9999 ]]; then
27 # @ECLASS-VARIABLE: MATE_TARBALL_SUFFIX
30 # All projects hosted on mate-desktop.org provide tarballs as tar.xz.
31 # Undefined in live ebuilds.
32 [[ ${PV} != 9999 ]] && : ${MATE_TARBALL_SUFFIX:="xz"}
34 # @ECLASS-VARIABLE: MATE_DESKTOP_ORG_PN
36 # Name of the package as hosted on mate-desktop.org.
37 # Leave unset if package name matches PN.
38 : ${MATE_DESKTOP_ORG_PN:=$PN}
40 # @ECLASS-VARIABLE: MATE_DESKTOP_ORG_PV
42 # Package version string as listed on mate-desktop.org.
43 # Leave unset if package version string matches PV.
44 : ${MATE_DESKTOP_ORG_PV:=$PV}
46 # @ECLASS-VARIABLE: MATE_BRANCH
48 # Major and minor numbers of the version number, unless live.
49 # If live ebuild, will be set to '9999'.
50 : ${MATE_BRANCH:=$(get_version_component_range 1-2)}
52 # Set SRC_URI or EGIT_REPO_URI based on whether live
53 if [[ ${PV} == 9999 ]]; then
54 EGIT_REPO_URI="https://github.com/mate-desktop/${MATE_DESKTOP_ORG_PN}.git"
57 SRC_URI="https://pub.mate-desktop.org/releases/${MATE_BRANCH}/${MATE_DESKTOP_ORG_PN}-${MATE_DESKTOP_ORG_PV}.tar.${MATE_TARBALL_SUFFIX}"
60 # Set HOMEPAGE for all ebuilds
61 HOMEPAGE="https://mate-desktop.org"