summaryrefslogtreecommitdiff
blob: bf2d72661c01c1922cf4bdabc575167dc5044f13 (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
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/icaclient/icaclient-10.6.ebuild,v 1.5 2007/11/14 14:59:36 beandog Exp $

inherit eutils multilib rpm

DESCRIPTION="ICA Client"
HOMEPAGE="http://www.citrix.com/"
SRC_URI="http://download2.citrix.com/FILES/en/products/Linux10/ICAClient-${PV}-1.i386.rpm"

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

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"

RDEPEND="virtual/libc
	x86? (
		x11-libs/libXp
		x11-libs/libXaw
		x11-libs/libX11
		x11-libs/libSM
		x11-libs/libICE )
	=x11-libs/openmotif-2.2*
	amd64? ( >=app-emulation/emul-linux-x86-xlibs-1.0 )"
DEPEND="${RDEPEND}"

S="${WORKDIR}/usr"

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

pkg_nofetch() {
	einfo "Please download ${A} yourself from www.citrix.com"
	einfo "http://www.citrix.co.uk/English/SS/downloads/details.asp?dID=2755&downloadID=3323&pID=186"
	einfo "and place it in ${DISTDIR}"
}

src_unpack() {
	# You must download ICAClient-10.0-2.i386.rpm
	# from www.citrix.com and put it in ${DISTDIR}
	einfo "Unpacking"
	rpm_src_unpack
}

src_install() {
	dodir /opt/ICAClient

	insinto /opt/ICAClient
	doins lib/ICAClient/Npica* lib/ICAClient/*.DLL lib/ICAClient/eula.txt \
		lib/ICAClient/npica.so lib/ICAClient/readme.txt lib/ICAClient/libctxssl.so

	insinto /opt/ICAClient/config
	doins lib/ICAClient/config/* lib/ICAClient/config/.*

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

	insinto /opt/ICAClient/help
	doins lib/ICAClient/help/*

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

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

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

	insinto /opt/ICAClient/icons
	doins lib/ICAClient/icons/*

	insinto /opt/ICAClient/keyboard
	doins lib/ICAClient/keyboard/*

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

	insinto /opt/ICAClient/util
	doins lib/ICAClient/util/{XCapture,XCapture.ad,echo_cmd,icalicense.sh,integrate.sh,nslaunch,pac.js,pacexec,xcapture}
	dosym /opt/ICAClient/util/integrate.sh /opt/ICAClient/util/disintegrate.sh

	exeinto /opt/ICAClient
	doexe lib/ICAClient/wfcmgr lib/ICAClient/wfcmgr.bin lib/ICAClient/wfica \
		lib/ICAClient/wfica_assoc.sh lib/ICAClient/wfica.sh

	doenvd "${FILESDIR}"/10ICAClient

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

	# 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 lib/ICAClient/icons/*
	make_wrapper wfcmgr 'env LC_ALL="" LANG="" /opt/ICAClient/wfcmgr'
	make_desktop_entry wfcmgr 'Citrix ICA Client' manager.xpm
}