chrome-remote-desktop-56.0.2924.51.ebuild 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # Base URL: https://dl.google.com/linux/chrome-remote-desktop/deb/
  4. # Fetch the Release file:
  5. # https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/Release
  6. # Which gives you the Packages file:
  7. # https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-i386/Packages
  8. # https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-amd64/Packages
  9. # And finally gives you the file name:
  10. # pool/main/c/chrome-remote-desktop/chrome-remote-desktop_29.0.1547.32_amd64.deb
  11. #
  12. # Use curl to find the answer:
  13. # curl -q https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-amd64/Packages | grep ^Filename
  14. EAPI="5"
  15. PYTHON_COMPAT=( python2_7 )
  16. inherit unpacker eutils python-single-r1
  17. DESCRIPTION="access remote computers via Chrome!"
  18. PLUGIN_URL="https://chrome.google.com/remotedesktop"
  19. HOMEPAGE="https://support.google.com/chrome/answer/1649523 ${PLUGIN_URL}"
  20. BASE_URI="https://dl.google.com/linux/chrome-remote-desktop/deb/pool/main/c/${PN}/${PN}_${PV}"
  21. SRC_URI="amd64? ( ${BASE_URI}_amd64.deb )"
  22. LICENSE="google-chrome"
  23. SLOT="0"
  24. KEYWORDS="-* ~amd64"
  25. IUSE=""
  26. # All the libs this package links against.
  27. RDEPEND="app-admin/sudo
  28. ${PYTHON_DEPS}
  29. >=dev-libs/expat-2
  30. dev-libs/glib:2
  31. dev-libs/nspr
  32. dev-libs/nss
  33. dev-python/psutil
  34. gnome-base/gconf:2
  35. media-libs/fontconfig
  36. media-libs/freetype:2
  37. sys-devel/gcc
  38. sys-libs/glibc
  39. sys-libs/pam
  40. x11-libs/cairo
  41. x11-libs/gtk+:2
  42. x11-libs/libX11
  43. x11-libs/libXdamage
  44. x11-libs/libXext
  45. x11-libs/libXfixes
  46. x11-libs/libXi
  47. x11-libs/libXrandr
  48. x11-libs/libXtst
  49. x11-libs/pango"
  50. # Settings we just need at runtime.
  51. RDEPEND+="
  52. x11-base/xorg-server[xvfb]"
  53. DEPEND=""
  54. S=${WORKDIR}
  55. QA_PREBUILT="/opt/google/chrome-remote-desktop/*"
  56. src_prepare() {
  57. epatch "${FILESDIR}"/${PN}-44.0.2403.44-always-sudo.patch #541708
  58. python_fix_shebang opt/google/chrome-remote-desktop/chrome-remote-desktop
  59. }
  60. src_install() {
  61. insinto /etc
  62. doins -r etc/opt
  63. insinto /opt
  64. doins -r opt/google
  65. chmod a+rx "${ED}"/opt/google/${PN}/* || die
  66. dodir /etc/pam.d
  67. dosym system-remote-login /etc/pam.d/${PN}
  68. dodoc usr/share/doc/${PN}/changelog*
  69. newinitd "${FILESDIR}"/${PN}.rc ${PN}
  70. newconfd "${FILESDIR}"/${PN}.conf.d ${PN}
  71. }
  72. pkg_postinst() {
  73. if [[ -z ${REPLACING_VERSIONS} ]] ; then
  74. elog "Two ways to launch the server:"
  75. elog "(1) access an existing desktop"
  76. elog " (a) install the Chrome plugin on the server & client:"
  77. elog " ${PLUGIN_URL}"
  78. elog " (b) on the server, run the Chrome plugin & enable remote access"
  79. elog " (c) on the client, connect to the server"
  80. elog "(2) headless system"
  81. elog " (a) install the Chrome plugin on the client:"
  82. elog " ${PLUGIN_URL}"
  83. elog " (b) run ${EPREFIX}opt/google/chrome-remote-desktop/start-host --help to get the auth URL"
  84. elog " (c) when it redirects you to a blank page, look at the URL for a code=XXX field"
  85. elog " (d) run start-host again, and past the code when asked for an authorization code"
  86. elog " (e) on the client, connect to the server"
  87. elog
  88. elog "Configuration settings you might want to be aware of:"
  89. elog " ~/.${PN}-session - shell script to start your session"
  90. elog " /etc/init.d/${PN} - script to auto-restart server"
  91. fi
  92. }