Magellan Linux

Contents of /smage/trunk/core/ica-client/ica-client-13.3.0.344519-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8432 - (show annotations) (download)
Wed Jan 27 08:03:04 2016 UTC (8 years, 3 months ago) by niro
File size: 8065 byte(s)
-fixed broken eula installation with version 13.3.0
1 # $Id$
2
3 PNAME="ica-client"
4 PVER="13.3.0.344519"
5 PBUILD="r2"
6
7 PCAT="net-misc"
8
9 DESCRIPTION="Citrix ICA client."
10 HOMEPAGE="http://www.citrix.com/"
11
12 # install usb daemon, 1=true/ 0=false
13 USBDAEMON=0
14 SPECIAL_VARS="USBDAEMON"
15
16 DEPEND=">= sys-libs/libstdc++-5.1
17 >= sys-libs/zlib-1.2
18 >= dev-libs/glib2-2.44
19 >= dev-libs/atk-2.16
20 >= dev-libs/libxml2-2.9
21 >= dev-util/xerces-c-3.1
22 >= net-dns/libidn-1.31
23 >= x11-libs/libX11-1.6
24 >= x11-libs/libXext-1.3
25 >= x11-libs/libXfixes-5
26 >= x11-libs/libXinerama-1.1
27 >= x11-libs/libXrender-0.9
28 >= x11-libs/cairo-1.14
29 >= x11-libs/gdk-pixbuf-2.30
30 >= x11-libs/pango-1.36
31 >= x11-libs/gtk2+-2.24
32 >= media-fonts/font-adobe-75dpi-1"
33
34 # >= media-libs/alsa-lib-1.0.29
35 # >= media-libs/libogg-1.3
36 # >= media-libs/libvorbis-1.3
37
38 if [[ ${USBDAEMON} = 1 ]]
39 then
40 DEPEND="${DEPEND}
41 >= sys-fs/udev-218"
42 fi
43
44 SDEPEND=">= virtual/sed"
45
46 SRCFILE="linuxx86-${PVER}.tar.gz"
47 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
48
49 # only keep the essential files to run wfica, pnabrowse or storebrowse
50 ALX_PKG_KEEP="etc/env.d/10ica-client
51 opt/Citrix/ICAClient/AuthManagerDaemon
52 opt/Citrix/ICAClient/CHARICONV.DLL
53 opt/Citrix/ICAClient/PDCRYPT1.DLL
54 opt/Citrix/ICAClient/PrimaryAuthManager
55 opt/Citrix/ICAClient/ServiceRecord
56 opt/Citrix/ICAClient/libctxssl.so
57 opt/Citrix/ICAClient/libproxy.so
58 opt/Citrix/ICAClient/wfica
59 opt/Citrix/ICAClient/config
60 opt/Citrix/ICAClient/gtk
61 opt/Citrix/ICAClient/icons/receiver.png
62 opt/Citrix/ICAClient/keyboard/keyboard.ini
63 opt/Citrix/ICAClient/keyboard/automatic.kbd
64 opt/Citrix/ICAClient/keyboard/linux.kbd
65 opt/Citrix/ICAClient/keystore/cacerts
66 opt/Citrix/ICAClient/lib/UIDialogLib.so
67 opt/Citrix/ICAClient/lib/libAMSDK.so
68 opt/Citrix/ICAClient/nls/C
69 opt/Citrix/ICAClient/nls/en/appsrv.ini
70 opt/Citrix/ICAClient/nls/en/eula.txt
71 opt/Citrix/ICAClient/nls/en/module.ini
72 opt/Citrix/ICAClient/nls/en/pna.nls
73 opt/Citrix/ICAClient/nls/en/wfclient.ini
74 opt/Citrix/ICAClient/nls/en.UTF-8/eula.txt
75 opt/Citrix/ICAClient/util/ctx_rehash
76 opt/Citrix/ICAClient/util/new_store
77 opt/Citrix/ICAClient/util/pnabrowse
78 opt/Citrix/ICAClient/util/pnabrowse_launch
79 opt/Citrix/ICAClient/util/storebrowse
80 opt/Citrix/ICAClient/eula.txt
81 usr/bin/wfica
82 usr/bin/pnabrowse
83 usr/bin/storebrowse"
84
85 if [[ ${USBDAEMON} = 1 ]]
86 then
87 ALX_PKG_KEEP+=" usr/lib/systemd/system/ctxusb.service
88 usr/lib/udev/rules.d/85-ctxusbd.rules
89 opt/Citrix/ICAClient/ctx_usb_isactive
90 opt/Citrix/ICAClient/usb.conf
91 opt/Citrix/ICAClient/VDGUSB.DLL
92 opt/Citrix/ICAClient/ctxusbd
93 opt/Citrix/ICAClient/ctxusb
94 usr/bin/ctx_usb_isactive
95 usr/bin/ctxusb
96 usr/sbin/ctxusbd
97 etc/tmpfiles.d/ctxusb.conf"
98 fi
99
100 sminclude mtools udev systemd alx-split
101
102 # += to add injection files (alx.sminc)
103 SRC_URI+=(
104 http://download2.citrix.com/FILES/en/products/Linux${PVER:0:2}/${SRCFILE}
105 mirror://ica-client/${SRCFILE}
106 )
107
108 if [[ ${USBDAEMON} = 1 ]]
109 then
110 SRC_URI+=( mirror://ica-client/ctxusbd.service
111 mirror://ica-client/ctxusbd.rules
112 mirror://ica-client/ctxusbd.tmpfilesd )
113 fi
114
115 install_from_psf()
116 {
117 local psf line type file symlink pkg attr user group
118 psf="$1"
119
120 minstalldir /opt/Citrix/ICAClient || die
121
122 cat ${psf} | while read line
123 do
124 set $line
125 type="$1"
126 file="$2"
127 case $type in
128 s|h)
129 symlink="$3"
130 shift
131 ;;
132 d|f)
133 symlink=""
134 ;;
135 esac
136
137 pkg="$3"
138 attr="$4"
139 user="$5"
140 group="$6"
141
142 case ${file} in
143 .) continue ;;
144 esac
145
146 case ${type} in
147 d)
148 minstalldir /opt/Citrix/ICAClient/${file} || die
149 ;;
150 f)
151 case ${attr} in
152 555) minstallexec ${file} /opt/Citrix/ICAClient/${file} || die ;;
153 444) minstallfile ${file} /opt/Citrix/ICAClient/${file} || die ;;
154 esac
155 ;;
156 s)
157 mlink ${symlink} /opt/Citrix/ICAClient/${file} || die
158 ;;
159 h)
160 mlink ${symlink} /opt/Citrix/ICAClient/${file} || die
161 ;;
162 esac
163 done
164 }
165
166 src_prepare()
167 {
168 munpack ${SRCFILE} ${SRCDIR} || die
169 cd ${SRCDIR}/linuxx86/linuxx86.cor
170
171 sed 's:###ICAROOT###:/opt/Citrix/ICAClient:g' usb/ctxusbd.rc usb/ica-usb.rules || die
172 }
173
174 alx_generic_src_install()
175 {
176 cd ${SRCDIR}/linuxx86/linuxx86.cor
177
178 minstalldir /opt/Citrix/ICAClient || die
179 # read psf file and install files and symlinks
180 install_from_psf ${SRCDIR}/linuxx86/linuxx86.psf || die
181
182 # eula symlink is a must or wfica and co will not find UIDialog.so
183 mlink ./nls/en.UTF-8/eula.txt /opt/Citrix/ICAClient/eula.txt || die
184
185 # symlink some inis to config dir from nls dir
186 minstalldir /opt/Citrix/ICAClient/config || die
187 mlink ../nls/en/appsrv.ini /opt/Citrix/ICAClient/config/appsrv.ini || die
188 mlink ../nls/en/module.ini /opt/Citrix/ICAClient/config/module.ini || die
189 mlink ../nls/en/wfclient.ini /opt/Citrix/ICAClient/config/wfclient.ini || die
190
191 # make this installation a server installation to seperate config files for every user
192 memptyfile /opt/Citrix/ICAClient/config/.server || die
193
194 # create wfica.sh
195 MCONFIG="/opt/Citrix/ICAClient/wfica.sh"
196 mclearconfig || die
197 maddconfig '#!/bin/sh' || die
198 maddconfig 'ICAROOT=/opt/Citrix/ICAClient' || die
199 maddconfig 'export ICAROOT' || die
200 maddconfig 'LD_LIBRARY_PATH=${ICAROOT}/lib' || die
201 maddconfig 'export LD_LIBRARY_PATH' || die
202 maddconfig '$ICAROOT/wfica -file $1' || die
203 mchmod 0755 /opt/Citrix/ICAClient/wfica.sh || die
204
205 # create wfica_assoc.sh
206 MCONFIG="/opt/Citrix/ICAClient/wfica_assoc.sh"
207 mclearconfig || die
208 maddconfig '#!/bin/sh' || die
209 maddconfig 'ICAROOT=/opt/Citrix/ICAClient' || die
210 maddconfig 'export ICAROOT' || die
211 maddconfig '$ICAROOT/wfica -associate -fileparam $1' || die
212 mchmod 0755 /opt/Citrix/ICAClient/wfica_assoc.sh || die
213
214 # install wrappers to prevent slowdowns with other locales than 'C'
215 minstalldir /usr/bin || die
216 MCONFIG="/usr/bin/wfica"
217 mclearconfig || die
218 maddconfig 'env LC_ALL="" LANG="" LD_LIBRARY_PATH="/opt/Citrix/ICAClient/lib" /opt/Citrix/ICAClient/wfica $*' || die
219 mchmod 0755 /usr/bin/wfica || die
220 MCONFIG="/usr/bin/pnabrowse"
221 mclearconfig || die
222 maddconfig 'env LC_ALL="" LANG="" LD_LIBRARY_PATH="/opt/Citrix/ICAClient/lib" /opt/Citrix/ICAClient/util/pnabrowse $*' || die
223 mchmod 0755 /usr/bin/pnabrowse || die
224 MCONFIG="/usr/bin/storebrowse"
225 mclearconfig || die
226 maddconfig 'env LC_ALL="" LANG="" LD_LIBRARY_PATH="/opt/Citrix/ICAClient/lib" /opt/Citrix/ICAClient/util/storebrowse $*' || die
227 mchmod 0755 /usr/bin/storebrowse || die
228
229 # fixes some hardcoded pathes
230 minstalldir /etc/env.d || die
231 MCONFIG="/etc/env.d/10ica-client"
232 mclearconfig || die
233 maddconfig 'ICAROOT=/opt/Citrix/ICAClient' || die
234
235 # # set default browserprotocol to tcp/ip
236 # # ( citrix named this in their config as UDP)
237 # sed -i "s:^\(BrowserProtocol=\).*:\1UDP:" ${BINDIR}/opt/Citrix/ICAClient/config/wfclient.ini || die
238 #
239 # newer XenApp use https
240 sed -i "s:^\(BrowserProtocol=\).*:\1HTTPonTCP:" ${BINDIR}/opt/Citrix/ICAClient/config/wfclient.ini || die
241
242 # auto enable com port mapping for com1 and com2
243 sed -i 's:^\(\[WFClient\]\):\1\nComPort1=/dev/ttyS1\nComPort2=/dev/ttyS2\nLastComPortNum=2\n:' \
244 ${BINDIR}/opt/Citrix/ICAClient/config/wfclient.ini || die
245
246 if [[ ${USBDAEMON} = 1 ]]
247 then
248 cd ${SRCDIR}/linuxx86/linuxx86.cor/usb
249 mcopy -a \* /opt/Citrix/ICAClient || die
250 mdelete /opt/Citrix/ICAClient/ctxusbd.rc || die
251 minstallunit ctxusbd.service || die
252 minstalludevrule ctxusbd.rules 85-ctxusbd.rules || die
253 minstalldir /usr/bin || die
254 mlink /opt/Citrix/ICAClient/ctx_usb_isactive /usr/bin/ctx_usb_isactive || die
255 mlink /opt/Citrix/ICAClient/ctxusb /usr/bin/ctxusb || die
256 minstalldir /usr/sbin || die
257 mlink /opt/Citrix/ICAClient/ctxusbd /usr/sbin/ctxusbd || die
258 minstalltmp ctxusbd.tmpfilesd ctxusbd.conf || die
259 fi
260
261 # insert our company cert
262 mcinjectfile ESA.pem /opt/Citrix/ICAClient/keystore/cacerts/ || die
263 # rehash all certificates
264 ICAROOT=${BINDIR}/opt/Citrix/ICAClient/keystore/cacerts ${BINDIR}/opt/Citrix/ICAClient/util/ctx_rehash || die
265 }
266
267 preinstall()
268 {
269 add_conf_prot_mask /etc/env.d
270 }
271
272 postinstall()
273 {
274 if [[ ${USBDAEMON} = 1 ]]
275 then
276 [ -d ${MROOT}/run/ctxusbd ] || install -d ${MROOT}/run/ctxusbd
277 mstartunit ctxusbd.service
278 fi
279 }
280
281 postremove()
282 {
283 # always try to stop this service
284 mstopunit ctxusbd.service
285 }