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.
9 # @BLURB: Helper eclass for mate-desktop.org hosted archives
11 # Provide a default SRC_URI and EGIT_REPO_URI for MATE packages as well as
12 # exporting some useful values like the MATE_BRANCH
14 # EAPIs < 6 are banned.
17 *) die "EAPI=${EAPI:-0} is not supported" ;;
20 if [[ ${PV} == 9999 ]]; then
26 # @ECLASS-VARIABLE: MATE_TARBALL_SUFFIX
29 # All projects hosted on mate-desktop.org provide tarballs as tar.xz.
30 # Undefined in live ebuilds.
31 [[ ${PV} != 9999 ]] && : ${MATE_TARBALL_SUFFIX:="xz"}
33 # @ECLASS-VARIABLE: MATE_DESKTOP_ORG_PN
35 # Name of the package as hosted on mate-desktop.org.
36 # Leave unset if package name matches PN.
37 : ${MATE_DESKTOP_ORG_PN:=$PN}
39 # @ECLASS-VARIABLE: MATE_DESKTOP_ORG_PV
41 # Package version string as listed on mate-desktop.org.
42 # Leave unset if package version string matches PV.
43 : ${MATE_DESKTOP_ORG_PV:=$PV}
45 # @ECLASS-VARIABLE: MATE_BRANCH
47 # Major and minor numbers of the version number, unless live.
48 # If live ebuild, will be set to '9999'.
49 : ${MATE_BRANCH:=$(get_version_component_range 1-2)}
51 # Set SRC_URI or EGIT_REPO_URI based on whether live
52 if [[ ${PV} == 9999 ]]; then
53 EGIT_REPO_URI="https://github.com/mate-desktop/${MATE_DESKTOP_ORG_PN}.git"
56 SRC_URI="https://pub.mate-desktop.org/releases/${MATE_BRANCH}/${MATE_DESKTOP_ORG_PN}-${MATE_DESKTOP_ORG_PV}.tar.${MATE_TARBALL_SUFFIX}"
59 # Set HOMEPAGE for all ebuilds
60 HOMEPAGE="https://mate-desktop.org"