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