summaryrefslogtreecommitdiff
blob: f7fbbeaf9fc8a76129440df485dd69e85b8fc7c5 (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
130
# 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.ebuild,v 1.1 2009/03/30 17:20:05 fauli Exp $

EAPI=1

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 +motif nsplugin"
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
	x86? (
		x11-libs/libXp
		x11-libs/libXaw
		x11-libs/libX11
		x11-libs/libSM
		x11-libs/libICE
		motif? ( >=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"
	if ! use motif && ! use nsplugin; then
		eerror "At least one USE flag out of nsplugin and motif must be enabled"
		die
	fi
}

pkg_nofetch() {
	elog "Download the client RPM file 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

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

	if use motif; then
		# 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.
		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
	fi
}