diff options
author | Henning Schild <henning@hennsch.de> | 2023-03-31 14:39:12 +0200 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2023-04-15 15:43:25 +0300 |
commit | e575292be341611ebac6bdbaba694f62fb6f7797 (patch) | |
tree | 84d5025b1d345623d74c9db3e1797c47b2b7c770 /net-misc | |
parent | net-misc/icaclient: bump to 23.3.0.32 (diff) | |
download | gentoo-e575292be341611ebac6bdbaba694f62fb6f7797.tar.gz gentoo-e575292be341611ebac6bdbaba694f62fb6f7797.tar.bz2 gentoo-e575292be341611ebac6bdbaba694f62fb6f7797.zip |
net-misc/icaclient: enable usb redirect support
We need to copy the content of the usb/ subfolder into ICAROOT and
enable the USB support in module.ini. There are udev rules and a daemon
but none of that seems needed.
Users need to be in 'usb' group, mention that in postinst.
Since we have an increasing number of changes to module.ini and the user
might in fact also want to change stuff (like i.e. FIDO2), we move the
file to /etc. Same goes for usb.conf in which users can customize which
USB devices can be redirected.
Closes: https://bugs.gentoo.org/890539
Signed-off-by: Henning Schild <henning@hennsch.de>
Closes: https://github.com/gentoo/gentoo/pull/30352
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/icaclient/icaclient-23.3.0.32.ebuild | 33 | ||||
-rw-r--r-- | net-misc/icaclient/metadata.xml | 1 |
2 files changed, 30 insertions, 4 deletions
diff --git a/net-misc/icaclient/icaclient-23.3.0.32.ebuild b/net-misc/icaclient/icaclient-23.3.0.32.ebuild index 189b58a4df53..2f09e585711e 100644 --- a/net-misc/icaclient/icaclient-23.3.0.32.ebuild +++ b/net-misc/icaclient/icaclient-23.3.0.32.ebuild @@ -13,7 +13,7 @@ SRC_URI="amd64? ( linuxx64-${PV}.tar.gz ) LICENSE="icaclient" SLOT="0" KEYWORDS="-* ~amd64 ~x86" -IUSE="l10n_de l10n_es l10n_fr l10n_ja l10n_zh-CN hdx" +IUSE="l10n_de l10n_es l10n_fr l10n_ja l10n_zh-CN hdx usb" RESTRICT="mirror strip fetch" ICAROOT="/opt/Citrix/ICAClient" @@ -96,6 +96,7 @@ RDEPEND=" x11-libs/pango ${BDEPEND} !hdx? ( !media-plugins/hdx-realtime-media-engine ) + usb? ( sys-apps/systemd-utils ) " DEPENDS="" @@ -129,6 +130,14 @@ src_prepare() { rm lib/UIDialogLibWebKit.so || die cp nls/en/module.ini . || die + if use usb; then + # inspired by debian usb support package postinst + sed -i -e 's/^[ \t]*VirtualDriver[ \t]*=.*$/&, GenericUSB/' module.ini || die + sed -i -e '/\[ICA 3.0\]/a\GenericUSB=on' module.ini || true + echo "[GenericUSB]" >> module.ini || true + echo "DriverName=VDGUSB.DLL" >> module.ini + fi + if use hdx; then "${BROOT}${ICAROOT}"/rtme/RTMEconfig -install -ignoremm || die mv new_module.ini module.ini || die @@ -141,8 +150,19 @@ src_install() { dodir "${ICAROOT}" + keepdir /etc/icaclient + + insinto "${ICAROOT}" exeinto "${ICAROOT}" doexe *.DLL libproxy.so wfica AuthManagerDaemon PrimaryAuthManager selfservice ServiceRecord + if use usb; then + doexe usb/ctxusb usb/ctxusbd usb/ctx_usb_isactive + doins usb/*.DLL + insinto /etc/icaclient + doins usb/usb.conf + dosym ../../../etc/icaclient/usb.conf "${ICAROOT}"/usb.conf + insinto "${ICAROOT}" + fi exeinto "${ICAROOT}"/lib doexe lib/*.so @@ -152,11 +172,10 @@ src_install() { doins nls/en.UTF-8/eula.txt done - insinto "${ICAROOT}" - doins -r usb - insinto "${ICAROOT}"/config doins config/* + mv "${ED}/${ICAROOT}"/config/module.ini "${ED}"/etc/icaclient/ || die + dosym ../../../../etc/icaclient/module.ini "${ICAROOT}"/config/module.ini for tmpl in {appsrv,wfclient}.template ; do newins nls/en/${tmpl} ${tmpl/template/ini} done @@ -275,6 +294,12 @@ pkg_postinst() { ewarn "not need to be explicitly installed anymore." fi fi + + if use usb; then + einfo + einfo "Add users of ${CATEGORY}/${PN} to group 'usb' for redirect to work" + einfo + fi } pkg_postrm() { diff --git a/net-misc/icaclient/metadata.xml b/net-misc/icaclient/metadata.xml index 83d0f6942931..3c9ca3ab8356 100644 --- a/net-misc/icaclient/metadata.xml +++ b/net-misc/icaclient/metadata.xml @@ -11,5 +11,6 @@ </maintainer> <use> <flag name="hdx">Install and enable hdx-realtime-media-engine plugin</flag> + <flag name="usb">Allow connecting USB devices to virtual desktops</flag> </use> </pkgmetadata> |