summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNP-Hardass <NP-Hardass@gentoo.org>2016-08-11 02:14:27 -0400
committerNP-Hardass <NP-Hardass@gentoo.org>2016-08-12 01:11:46 -0400
commit27db3020e0efbe90a2d93f48e0a39b50c73cb763 (patch)
tree8c1ce8e59fe5f77340ed933b9d1b03061cf6c5e7 /eclass/mate-desktop.org.eclass
parentdev-ruby/gettext_i18n_rails: add 1.8.0 (diff)
downloadgentoo-27db3020e0efbe90a2d93f48e0a39b50c73cb763.tar.gz
gentoo-27db3020e0efbe90a2d93f48e0a39b50c73cb763.tar.bz2
gentoo-27db3020e0efbe90a2d93f48e0a39b50c73cb763.zip
eclass: Add mate{,-desktop.org}.eclass from project repo
Diffstat (limited to 'eclass/mate-desktop.org.eclass')
-rw-r--r--eclass/mate-desktop.org.eclass65
1 files changed, 65 insertions, 0 deletions
diff --git a/eclass/mate-desktop.org.eclass b/eclass/mate-desktop.org.eclass
new file mode 100644
index 000000000000..6587957a1ccd
--- /dev/null
+++ b/eclass/mate-desktop.org.eclass
@@ -0,0 +1,65 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# @ECLASS: mate-desktop.org.eclass
+# @MAINTAINER:
+# mate@gentoo.org
+# @AUTHOR:
+# Authors: NP-Hardass <NP-Hardass@gentoo.org> based upon the gnome.org eclass.
+# @BLURB: Helper eclass for mate-desktop.org hosted archives
+# @DESCRIPTION:
+# Provide a default SRC_URI and EGIT_REPO_URI for MATE packages as well as
+# exporting some useful values like the MATE_BRANCH
+
+# EAPIs < 6 are banned.
+case "${EAPI:-0}" in
+ 6) ;;
+ *) die "EAPI=${EAPI:-0} is not supported" ;;
+esac
+
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+fi
+
+inherit versionator
+
+# @ECLASS-VARIABLE: MATE_TARBALL_SUFFIX
+# @INTERNAL
+# @DESCRIPTION:
+# All projects hosted on mate-desktop.org provide tarballs as tar.xz.
+# Undefined in live ebuilds.
+[[ ${PV} != 9999 ]] && : ${MATE_TARBALL_SUFFIX:="xz"}
+
+# @ECLASS-VARIABLE: MATE_DESKTOP_ORG_PN
+# @DESCRIPTION:
+# Name of the package as hosted on mate-desktop.org.
+# Leave unset if package name matches PN.
+: ${MATE_DESKTOP_ORG_PN:=$PN}
+
+# @ECLASS-VARIABLE: MATE_DESKTOP_ORG_PV
+# @DESCRIPTION:
+# Package version string as listed on mate-desktop.org.
+# Leave unset if package version string matches PV.
+: ${MATE_DESKTOP_ORG_PV:=$PV}
+
+# @ECLASS-VARIABLE: MATE_BRANCH
+# @DESCRIPTION:
+# Major and minor numbers of the version number, unless live.
+# If live ebuild, will be set to '9999'.
+: ${MATE_BRANCH:=$(get_version_component_range 1-2)}
+
+# Set SRC_URI or EGIT_REPO_URI based on whether live
+if [[ ${PV} == 9999 ]]; then
+ EGIT_REPO_URI="
+ https://github.com/mate-desktop/${MATE_DESKTOP_ORG_PN}.git
+ git://github.com/mate-desktop/${MATE_DESKTOP_ORG_PN}.git
+ http://github.com/mate-desktop/${MATE_DESKTOP_ORG_PN}.git
+ "
+ SRC_URI=""
+else
+ SRC_URI="http://pub.mate-desktop.org/releases/${MATE_BRANCH}/${MATE_DESKTOP_ORG_PN}-${MATE_DESKTOP_ORG_PV}.tar.${MATE_TARBALL_SUFFIX}"
+fi
+
+# Set HOMEPAGE for all ebuilds
+HOMEPAGE="http://mate-desktop.org"