summaryrefslogtreecommitdiff
blob: c94442a0a5905bc9358deb58a5231fb280736ff0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/icaclient/icaclient-11.0-r2.ebuild,v 1.3 2009/07/02 19:28:06 maekke Exp $

inherit eutils multilib rpm

DESCRIPTION="ICA Client for Citrix Presentation servers"
HOMEPAGE="http://www.citrix.com/"
# There is no direct download link from upstream, see pkg_nofetch()
SRC_URI="ICAClient-11.0-1.i386.rpm"

LICENSE="as-is"
SLOT="0"
KEYWORDS="-* amd64 x86"
IUSE="linguas_de linguas_ja"
RESTRICT="mirror strip userpriv fetch"

QA_TEXTRELS="opt/ICAClient/VDSCARD.DLL
	opt/ICAClient/TW1.DLL
	opt/ICAClient/NDS.DLL
	opt/ICAClient/CHARICONV.DLL
	opt/ICAClient/PDCRYPT1.DLL
	opt/ICAClient/VDCM.DLL
	opt/ICAClient/libctxssl.so
	opt/ICAClient/PDCRYPT2.DLL
	opt/ICAClient/npica.so
	opt/ICAClient/VDSPMIKE.DLL"
QA_EXECSTACK="opt/ICAClient/wfica.bin
	opt/ICAClient/libctxssl.so"

RDEPEND="x11-terms/xterm
	media-fonts/font-adobe-100dpi
	media-fonts/font-misc-misc
	media-fonts/font-cursor-misc
	x86? (
		x11-libs/libXp
		x11-libs/libXaw
		x11-libs/libX11
		x11-libs/libSM
		x11-libs/libICE
		>=x11-libs/openmotif-2.3.1
		)
	amd64? ( >=app-emulation/emul-linux-x86-xlibs-20080316 )"
DEPEND=""
S="${WORKDIR}/usr/lib/ICAClient"

pkg_setup() {
	# Binary x86 package
	has_multilib_profile && ABI="x86"
}

pkg_nofetch() {
	elog "Download the client RPM file ${SRC_URI} from http://www.citrix.com/English/SS/downloads/details.asp?downloadID=3323"
	elog "and place it in ${DISTDIR:-/usr/portage/distfiles}."
}

src_install() {
	dodir /opt/ICAClient

	insinto /opt/ICAClient
	doins *.DLL npica.so libctxssl.so libproxy.so nls/en/eula.txt

	insinto /opt/ICAClient/config
	doins config/* config/.* nls/en/*.ini

	insinto /opt/ICAClient/config/usertemplate
	doins config/usertemplate/*

	insinto /opt/ICAClient/nls
	dosym en /opt/ICAClient/nls/C

	insinto /opt/ICAClient/nls/en
	doins nls/en/*

	insinto /opt/ICAClient/nls/en/UTF-8
	doins nls/en/UTF-8/*

	if use linguas_de; then
		insinto /opt/ICAClient/nls/de
		doins nls/de/*

		insinto /opt/ICAClient/nls/de/UTF-8
		doins nls/de/UTF-8/*
	fi
	if use linguas_ja; then
		insinto /opt/ICAClient/nls/ja
		doins nls/ja/*

		insinto /opt/ICAClient/nls/ja/UTF-8
		doins nls/ja/UTF-8/*
	fi

	insinto /opt/ICAClient/icons
	doins icons/*

	insinto /opt/ICAClient/keyboard
	doins keyboard/*

	insinto /opt/ICAClient/keystore/cacerts
	doins keystore/cacerts/*

	insinto /opt/ICAClient/util
	doins util/{echo_cmd,gst_play,icalicense.sh,integrate.sh,libgstflatstm.so,nslaunch,pacexec,pac.js,sunraymac.sh,what,xcapture}
	dosym /opt/ICAClient/util/integrate.sh /opt/ICAClient/util/disintegrate.sh

	doenvd "${FILESDIR}"/10ICAClient

	dosym /opt/ICAClient/npica.so /usr/$(get_libdir)/nsbrowser/plugins/npica.so

	# wfica has libxcb locking bugs, so provide a wrapper.  It needs to be in
	# /opt/ICAClient to ensure it gets called, so rename wfica to wfica.bin.
	sed -e "/^ICAROOT.*$/d" -i wfica.sh || die
	exeinto /opt/ICAClient
	doexe wfcmgr.bin wfica_assoc.sh wfica.sh util/wfcmgr
	newexe wfica wfica.bin
	make_wrapper wfica 'env LC_ALL="" LANG="" LIBXCB_ALLOW_SLOPPY_LOCK=1 /opt/ICAClient/wfica.bin' . /opt/ICAClient /opt/ICAClient

	# The .desktop file included in the rpm links to /usr/lib, so we
	# make a new one.  The program gives errors and has slowdowns if
	# the locale is not English, so strip it since it has no
	# translations anyway
	doicon icons/*
	make_wrapper wfcmgr /opt/ICAClient/wfcmgr . /opt/ICAClient
	sed -e  's:^\# Configuration items.*:. /opt/ICAClient/nls/en/wfcmgr.msg:g' -i "${D}"/opt/ICAClient/wfcmgr
	make_desktop_entry wfcmgr 'Citrix ICA Client' manager

	dodir /etc/revdep-rebuild/
	echo "SEARCH_DIRS_MASK=/opt/ICAClient" > "${D}"/etc/revdep-rebuild/70icaclient
}