Files
gentoo-zh/net-misc/uuyc/uuyc-4.48.7.27441.ebuild
T
Zakk 603bc7e9db net-misc/uuyc: new package, add 4.48.7.27441
uuyc_service exits with "invalid_systemd_socket" unless systemd hands it
the uuyc.socket listener, and the desktop entry starts the GUI through
systemctl --user, so the package requires sys-apps/systemd and ships no
OpenRC script.

The release endpoint that upstream's install.sh uses redirects to a
signed URL. The versioned file on a56.gdl.netease.com downloads without
the signature, so SRC_URI points at it and nvchecker reads the redirect.

The Debian postinst creates /var/lib/Netease/uuyc and the /opt/uuyc/log
tree; uuyc.tmpfiles creates the same directories with the same modes.

uuyc_webview_host dlopens webkit-gtk 4.1 and uuyc_server dlopens libXtst,
libXRes and PAM, so RDEPEND lists them although no binary has them in
NEEDED.

On Wayland uuyc_service answers "not_ready" and never starts uuyc_server
unless the PipeWire user service is running when it first checks the
session, so RDEPEND has media-video/pipewire[systemd] for the user units.

The bundled libfuse3 runs /opt/uuyc/libexec/fusermount3, which the Debian
package ships setuid root. The ebuild links that path to the system helper
from sys-fs/fuse:3[suid] instead of installing a second setuid binary.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Zakk <zakk@gentoozh.org>
2026-11-29 17:45:53 +11:00

109 lines
2.9 KiB
Bash

# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop systemd tmpfiles unpacker xdg
DESCRIPTION="NetEase UU Remote desktop client"
HOMEPAGE="https://uuyc.163.com/"
SRC_URI="https://a56.gdl.netease.com/nrd-${PN}_${PV}-1_amd64.deb"
S="${WORKDIR}"
# bundled: Qt 5, OpenSSL 1.1, abseil, Crashpad, curl, fmt, fuse3, GCC runtime,
# libjpeg-turbo, xz, minizip, zlib, pipewire, libpng, protobuf, sentry, spdlog,
# libtiff, tmux
LICENSE="
uuyc
0BSD Apache-2.0 BSD curl GPL-2 GPL-3 gcc-runtime-library-exception-3.1 IJG ISC
LGPL-2.1 LGPL-3 libpng2 libtiff MIT openssl ZLIB
"
SLOT="0"
KEYWORDS="-* ~amd64"
RESTRICT="bindist mirror strip"
RDEPEND="
>=sys-libs/glibc-2.27
app-arch/zstd
dev-libs/glib:2
media-libs/fontconfig
media-libs/freetype
media-libs/libglvnd
media-libs/libpulse
media-libs/vulkan-loader
media-video/pipewire[systemd]
net-libs/webkit-gtk:4.1
sys-apps/dbus
sys-apps/systemd
sys-fs/fuse:3[suid]
sys-libs/pam
x11-libs/cairo
x11-libs/libdrm
x11-libs/libX11
x11-libs/libxcb
x11-libs/libXext
x11-libs/libXfixes
x11-libs/libXi
x11-libs/libxkbcommon[X]
x11-libs/libXrandr
x11-libs/libXrender
x11-libs/libXres
x11-libs/libXtst
x11-libs/xcb-util-image
x11-libs/xcb-util-keysyms
x11-libs/xcb-util-renderutil
x11-libs/xcb-util-wm
"
BDEPEND="media-gfx/icoutils"
QA_PREBUILT="opt/uuyc/*"
src_prepare() {
default
# the desktop entry points at a Windows .ico
sed -i 's|^Icon=.*|Icon=uuyc|' usr/share/applications/uuyc.desktop || die
# the bundled libfuse3 runs this path; use the system setuid helper
rm opt/uuyc/libexec/fusermount3 || die
}
src_install() {
insinto /opt
doins -r opt/uuyc
fperms 0755 /opt/uuyc/bin/{conpty_bridge,crashpad_handler,StreamerCodecDetector} \
/opt/uuyc/bin/{Upgrade,uuyc,uuyc-cli,uuyc_healthd,uuyc_server,uuyc_service} \
/opt/uuyc/bin/{uuyc_webview_host,terminal-launcher/xdg-terminal-exec} \
/opt/uuyc/libexec/tmux
dosym -r /usr/bin/fusermount3 /opt/uuyc/libexec/fusermount3
dobin usr/bin/uuyc usr/bin/uuyc-cli
exeinto /usr/lib/uuyc
doexe usr/lib/uuyc/uuyc-gui-session-start
insinto /usr/lib/uuyc
doins usr/lib/uuyc/install_config.ini
systemd_dounit lib/systemd/system/uuyc.{service,socket}
systemd_douserunit usr/lib/systemd/user/uuyc-gui.service
newtmpfiles "${FILESDIR}"/uuyc.tmpfiles uuyc.conf
insinto /usr/share/gnome-shell/extensions
doins -r usr/share/gnome-shell/extensions/drag-monitor@uuyc.netease.com
icotool -x -o "${T}" usr/share/icons/hicolor/256x256/apps/uuyc.ico || die
local size
for size in 16 24 32 48 64 72 128 256; do
newicon -s ${size} "${T}"/uuyc_*_${size}x${size}x32.png uuyc.png
done
domenu usr/share/applications/uuyc.desktop
}
pkg_postinst() {
xdg_pkg_postinst
tmpfiles_process uuyc.conf
if [[ -z ${REPLACING_VERSIONS} ]]; then
elog "The client reaches its service through /run/uuyc-control.sock:"
elog " systemctl enable --now uuyc.socket"
fi
}