Files
linamh/net-misc/chrome-remote-desktop/chrome-remote-desktop-148.0.7778.58.ebuild
Mario Fetka 33e69cb3d6 Bump
2026-05-10 08:25:26 +02:00

152 lines
6.7 KiB
Bash

# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Base URL: https://dl.google.com/linux/chrome-remote-desktop/deb/
# Fetch the Release file:
# https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/Release
# Which gives you the Packages file:
# https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-i386/Packages
# https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-amd64/Packages
# And finally gives you the file name:
# pool/main/c/chrome-remote-desktop/chrome-remote-desktop_29.0.1547.32_amd64.deb
#
# Use curl to find the answer:
# curl -q https://dl.google.com/linux/chrome-remote-desktop/deb/dists/stable/main/binary-amd64/Packages | grep ^Filename
EAPI=8
PYTHON_COMPAT=( python3_{10..14} )
PLOCALES="am am_FEMININE am_MASCULINE am_NEUTER ar ar_FEMININE ar_MASCULINE ar_NEUTER bg bg_FEMININE bg_MASCULINE bg_NEUTER bn bn_FEMININE bn_MASCULINE bn_NEUTER ca ca_FEMININE ca_MASCULINE ca_NEUTER cs cs_FEMININE cs_MASCULINE cs_NEUTER da da_FEMININE da_MASCULINE da_NEUTER de de_FEMININE de_MASCULINE de_NEUTER el el_FEMININE el_MASCULINE el_NEUTER en-GB en-GB_FEMININE en-GB_MASCULINE en-GB_NEUTER en en_FEMININE en_MASCULINE en_NEUTER es-419 es-419_FEMININE es-419_MASCULINE es-419_NEUTER es es_FEMININE es_MASCULINE es_NEUTER et et_FEMININE et_MASCULINE et_NEUTER fa fa_FEMININE fa_MASCULINE fa_NEUTER fi fi_FEMININE fi_MASCULINE fi_NEUTER fil fil_FEMININE fil_MASCULINE fil_NEUTER fr fr_FEMININE fr_MASCULINE fr_NEUTER gu gu_FEMININE gu_MASCULINE gu_NEUTER he he_FEMININE he_MASCULINE he_NEUTER hi hi_FEMININE hi_MASCULINE hi_NEUTER hr hr_FEMININE hr_MASCULINE hr_NEUTER hu hu_FEMININE hu_MASCULINE hu_NEUTER id id_FEMININE id_MASCULINE id_NEUTER it it_FEMININE it_MASCULINE it_NEUTER ja ja_FEMININE ja_MASCULINE ja_NEUTER kn kn_FEMININE kn_MASCULINE kn_NEUTER ko ko_FEMININE ko_MASCULINE ko_NEUTER lt lt_FEMININE lt_MASCULINE lt_NEUTER lv lv_FEMININE lv_MASCULINE lv_NEUTER ml ml_FEMININE ml_MASCULINE ml_NEUTER mr mr_FEMININE mr_MASCULINE mr_NEUTER ms ms_FEMININE ms_MASCULINE ms_NEUTER nb nb_FEMININE nb_MASCULINE nb_NEUTER nl nl_FEMININE nl_MASCULINE nl_NEUTER pl pl_FEMININE pl_MASCULINE pl_NEUTER pt-BR pt-BR_FEMININE pt-BR_MASCULINE pt-BR_NEUTER pt-PT pt-PT_FEMININE pt-PT_MASCULINE pt-PT_NEUTER ro ro_FEMININE ro_MASCULINE ro_NEUTER ru ru_FEMININE ru_MASCULINE ru_NEUTER sk sk_FEMININE sk_MASCULINE sk_NEUTER sl sl_FEMININE sl_MASCULINE sl_NEUTER sr sr_FEMININE sr_MASCULINE sr_NEUTER sv sv_FEMININE sv_MASCULINE sv_NEUTER sw sw_FEMININE sw_MASCULINE sw_NEUTER ta ta_FEMININE ta_MASCULINE ta_NEUTER te te_FEMININE te_MASCULINE te_NEUTER th th_FEMININE th_MASCULINE th_NEUTER tr tr_FEMININE tr_MASCULINE tr_NEUTER uk uk_FEMININE uk_MASCULINE uk_NEUTER vi vi_FEMININE vi_MASCULINE vi_NEUTER zh-CN zh-CN_FEMININE zh-CN_MASCULINE zh-CN_NEUTER zh-TW zh-TW_FEMININE zh-TW_MASCULINE zh-TW_NEUTER"
inherit unpacker python-single-r1 optfeature plocale
DESCRIPTION="access remote computers via Chrome!"
PLUGIN_URL="https://chrome.google.com/remotedesktop"
HOMEPAGE="https://support.google.com/chrome/answer/1649523
https://chrome.google.com/remotedesktop"
BASE_URI="https://dl.google.com/linux/chrome-remote-desktop/deb/pool/main/c/${PN}/${PN}_${PV}"
SRC_URI="amd64? ( ${BASE_URI}_amd64.deb )"
LICENSE="google-chrome"
SLOT="0"
KEYWORDS="-* ~amd64"
IUSE=""
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="bindist mirror"
# Packages we execute, but don't link.
RDEPEND="app-admin/sudo
${PYTHON_DEPS}"
# All the libs this package links against.
RDEPEND+="
>=dev-libs/expat-2
dev-libs/glib:2
dev-libs/nspr
dev-libs/nss
$(python_gen_cond_dep '
dev-python/psutil[${PYTHON_USEDEP}]
dev-python/pyxdg[${PYTHON_USEDEP}]
')
media-libs/fontconfig
media-libs/freetype:2
sys-apps/dbus
sys-devel/gcc
sys-libs/glibc
sys-libs/libutempter
sys-libs/pam
x11-apps/xdpyinfo
x11-apps/setxkbmap
x11-libs/cairo
x11-libs/gtk+:3
x11-libs/libX11
x11-libs/libxcb
x11-libs/libXdamage
x11-libs/libXext
x11-libs/libXfixes
x11-libs/libxkbcommon
x11-libs/libXrandr
x11-libs/libXtst
x11-libs/pango"
# Settings we just need at runtime.
# TODO: Look at switching to xf86-video-dummy & xf86-input-void instead of xvfb.
# - The env var (CHROME_REMOTE_DESKTOP_USE_XORG) seems to be stripped before being checked.
# - The Xorg invocation uses absolute paths with -logfile & -config which are rejected.
# - The config takes over the active display in addition to starting up a virtual one.
RDEPEND+="
x11-base/xorg-server[xvfb]"
BDEPEND="$(unpacker_src_uri_depends)"
S=${WORKDIR}
QA_PREBUILT="/opt/google/chrome-remote-desktop/*"
PATCHES=(
"${FILESDIR}"/${PN}-91.0.4472.10-always-sudo.patch #541708
)
src_prepare() {
default
gunzip usr/share/doc/${PN}/*.gz || die
cd opt/google/chrome-remote-desktop
python_fix_shebang chrome-remote-desktop
cd remoting_locales
# These isn't always included.
rm -f fake-bidi* || die
plocale_find_changes "${PWD}" '' '.pak'
}
src_install() {
pushd opt/google/chrome-remote-desktop/remoting_locales >/dev/null || die
rm_pak() { rm "${1}.pak" "${1}.pak.info"; }
plocale_for_each_disabled_locale rm_pak
popd >/dev/null
insinto /etc
doins -r etc/opt
dosym ../opt/chrome/native-messaging-hosts /etc/chromium/native-messaging-hosts #581754
insinto /opt
doins -r opt/google
chmod a+rx "${ED}"/opt/google/${PN}/* || die
if [[ -e ${ED}/opt/google/${PN}/user-session ]] ; then
fperms +s /opt/google/${PN}/user-session
else
ewarn "${PN}/user-session is not present in this release; skipping setuid bit"
fi
dodir /etc/pam.d
dosym system-remote-login /etc/pam.d/${PN}
dodoc usr/share/doc/${PN}/changelog*
newinitd "${FILESDIR}"/${PN}.rc ${PN}
newconfd "${FILESDIR}"/${PN}.conf.d ${PN}
}
pkg_postinst() {
optfeature "Dynamic resolution changes" "x11-apps/xrandr"
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog "Two ways to launch the server:"
elog "(1) access an existing desktop"
elog " (a) install the Chrome plugin on the server & client:"
elog " ${PLUGIN_URL}"
elog " (b) on the server, run the Chrome plugin & enable remote access"
elog " (c) on the client, connect to the server"
elog "(2) headless system"
elog " (a) install the Chrome plugin on the client:"
elog " ${PLUGIN_URL}"
elog " (b) run ${EPREFIX}/opt/google/chrome-remote-desktop/start-host --help to get the auth URL"
elog " (c) when it redirects you to a blank page, look at the URL for a code=XXX field"
elog " (d) run start-host again, and past the code when asked for an authorization code"
elog " (e) on the client, connect to the server"
elog
elog "Configuration settings you might want to be aware of:"
elog " ~/.${PN}-session - shell script to start your session"
elog " /etc/init.d/${PN} - script to auto-restart server"
fi
}