mate-desktop.org.eclass 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # @ECLASS: mate-desktop.org.eclass
  4. # @MAINTAINER:
  5. # mate@gentoo.org
  6. # @AUTHOR:
  7. # Authors: NP-Hardass <NP-Hardass@gentoo.org> based upon the gnome.org eclass.
  8. # @BLURB: Helper eclass for mate-desktop.org hosted archives
  9. # @DESCRIPTION:
  10. # Provide a default SRC_URI and EGIT_REPO_URI for MATE packages as well as
  11. # exporting some useful values like the MATE_BRANCH
  12. # EAPIs < 6 are banned.
  13. case "${EAPI:-0}" in
  14. 6) ;;
  15. *) die "EAPI=${EAPI:-0} is not supported" ;;
  16. esac
  17. if [[ ${PV} == 9999 ]]; then
  18. inherit git-r3
  19. fi
  20. inherit versionator
  21. # @ECLASS-VARIABLE: MATE_TARBALL_SUFFIX
  22. # @INTERNAL
  23. # @DESCRIPTION:
  24. # All projects hosted on mate-desktop.org provide tarballs as tar.xz.
  25. # Undefined in live ebuilds.
  26. [[ ${PV} != 9999 ]] && : ${MATE_TARBALL_SUFFIX:="xz"}
  27. # @ECLASS-VARIABLE: MATE_DESKTOP_ORG_PN
  28. # @DESCRIPTION:
  29. # Name of the package as hosted on mate-desktop.org.
  30. # Leave unset if package name matches PN.
  31. : ${MATE_DESKTOP_ORG_PN:=$PN}
  32. # @ECLASS-VARIABLE: MATE_DESKTOP_ORG_PV
  33. # @DESCRIPTION:
  34. # Package version string as listed on mate-desktop.org.
  35. # Leave unset if package version string matches PV.
  36. : ${MATE_DESKTOP_ORG_PV:=$PV}
  37. # @ECLASS-VARIABLE: MATE_BRANCH
  38. # @DESCRIPTION:
  39. # Major and minor numbers of the version number, unless live.
  40. # If live ebuild, will be set to '9999'.
  41. : ${MATE_BRANCH:=$(get_version_component_range 1-2)}
  42. # Set SRC_URI or EGIT_REPO_URI based on whether live
  43. if [[ ${PV} == 9999 ]]; then
  44. EGIT_REPO_URI="
  45. https://github.com/mate-desktop/${MATE_DESKTOP_ORG_PN}.git
  46. git://github.com/mate-desktop/${MATE_DESKTOP_ORG_PN}.git
  47. http://github.com/mate-desktop/${MATE_DESKTOP_ORG_PN}.git
  48. "
  49. SRC_URI=""
  50. else
  51. SRC_URI="http://pub.mate-desktop.org/releases/${MATE_BRANCH}/${MATE_DESKTOP_ORG_PN}-${MATE_DESKTOP_ORG_PV}.tar.${MATE_TARBALL_SUFFIX}"
  52. fi
  53. # Set HOMEPAGE for all ebuilds
  54. HOMEPAGE="http://mate-desktop.org"