chrome-gnome-shell-8.1.ebuild 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. PYTHON_COMPAT=( python2_7 python3_{4,5} )
  5. inherit cmake-utils python-single-r1
  6. DESCRIPTION="GNOME Shell integration for Chrome/Chromium, Firefox, Vivaldi, Opera browsers"
  7. HOMEPAGE="https://wiki.gnome.org/Projects/GnomeShellIntegrationForChrome"
  8. SRC_URI="mirror://gnome/sources/${PN}/${PV}/${P}.tar.xz"
  9. LICENSE="GPL-3+"
  10. SLOT="0"
  11. KEYWORDS="~amd64 ~x86"
  12. IUSE=""
  13. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  14. DEPEND="${PYTHON_DEPS}
  15. app-misc/jq
  16. sys-apps/coreutils
  17. "
  18. RDEPEND="${PYTHON_DEPS}
  19. dev-python/pygobject:3[${PYTHON_USEDEP}]
  20. dev-python/requests[${PYTHON_USEDEP}]
  21. gnome-base/gnome-shell
  22. "
  23. src_configure() {
  24. local mycmakeargs=( -DBUILD_EXTENSION=OFF )
  25. cmake-utils_src_configure
  26. }
  27. src_install() {
  28. # Chrome policy files should be removed with package.
  29. # Otherwise it will not be possible to uninstall web extension
  30. # from browser.
  31. echo -n "CONFIG_PROTECT_MASK=\"" > 50"${PN}" || die
  32. echo -n "/etc/chromium/policies/managed/${PN}.json " >> 50"${PN}" || die
  33. echo "/etc/opt/chrome/policies/managed/${PN}.json\"" >> 50"${PN}" || die
  34. doenvd 50"${PN}"
  35. cmake-utils_src_install
  36. }
  37. pkg_postinst() {
  38. elog "Please note that this package provides native messaging connector only."
  39. elog
  40. elog "Managed policy was installed to force browser extension installation"
  41. elog "for Google Chrome, Chromium and Vivaldi browsers from Chrome Store"
  42. elog "https://chrome.google.com/webstore/detail/gphhapmejobijbbhgpjhcjognlahblep"
  43. elog
  44. elog "For Mozilla Firefox you should manualy install browser extension from"
  45. elog "https://addons.mozilla.org/firefox/addon/gnome-shell-integration/"
  46. elog
  47. elog "For Opera you should manualy install browser extension from"
  48. elog "https://addons.opera.com/extensions/details/gnome-shell-integration/"
  49. }