ecm.eclass: Set correct KFMIN default for kde-frameworks/*
[gentoo.git] / eclass / mate-desktop.org.eclass
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 # @ECLASS: mate-desktop.org.eclass
5 # @MAINTAINER:
6 # mate@gentoo.org
7 # @AUTHOR:
8 # Authors: NP-Hardass <NP-Hardass@gentoo.org> based upon the gnome.org eclass.
9 # @SUPPORTED_EAPIS: 6
10 # @BLURB: Helper eclass for mate-desktop.org hosted archives
11 # @DESCRIPTION:
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
14
15 # EAPIs < 6 are banned.
16 case "${EAPI:-0}" in
17         6) ;;
18         *) die "EAPI=${EAPI:-0} is not supported" ;;
19 esac
20
21 if [[ ${PV} == 9999 ]]; then
22         inherit git-r3
23 fi
24
25 inherit versionator
26
27 # @ECLASS-VARIABLE: MATE_TARBALL_SUFFIX
28 # @INTERNAL
29 # @DESCRIPTION:
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"}
33
34 # @ECLASS-VARIABLE: MATE_DESKTOP_ORG_PN
35 # @DESCRIPTION:
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}
39
40 # @ECLASS-VARIABLE: MATE_DESKTOP_ORG_PV
41 # @DESCRIPTION:
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}
45
46 # @ECLASS-VARIABLE: MATE_BRANCH
47 # @DESCRIPTION:
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)}
51
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"
55         SRC_URI=""
56 else
57         SRC_URI="https://pub.mate-desktop.org/releases/${MATE_BRANCH}/${MATE_DESKTOP_ORG_PN}-${MATE_DESKTOP_ORG_PV}.tar.${MATE_TARBALL_SUFFIX}"
58 fi
59
60 # Set HOMEPAGE for all ebuilds
61 HOMEPAGE="https://mate-desktop.org"