Contents of /smage/trunk/core/ica-client/ica-client-13.3.0.344519-r4.smage2
Parent Directory | Revision Log
Revision 9494 -
(show annotations)
(download)
Thu Apr 13 11:21:51 2017 UTC (7 years ago) by niro
File size: 9076 byte(s)
Thu Apr 13 11:21:51 2017 UTC (7 years ago) by niro
File size: 9076 byte(s)
-rebuild with nox11 components from the platform SDK
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/appsrv.template |
75 | opt/Citrix/ICAClient/nls/en/eula.txt |
76 | opt/Citrix/ICAClient/nls/en/module.ini |
77 | opt/Citrix/ICAClient/nls/en/pna.nls |
78 | opt/Citrix/ICAClient/nls/en/wfclient.ini |
79 | opt/Citrix/ICAClient/nls/en/wfclient.template |
80 | opt/Citrix/ICAClient/nls/en.UTF-8/eula.txt |
81 | opt/Citrix/ICAClient/nls/en.UTF8 |
82 | opt/Citrix/ICAClient/nls/en.utf8 |
83 | opt/Citrix/ICAClient/util/ctx_rehash |
84 | opt/Citrix/ICAClient/util/new_store |
85 | opt/Citrix/ICAClient/util/pnabrowse |
86 | opt/Citrix/ICAClient/util/pnabrowse_launch |
87 | opt/Citrix/ICAClient/util/storebrowse |
88 | opt/Citrix/ICAClient/eula.txt |
89 | usr/bin/wfica |
90 | usr/bin/pnabrowse |
91 | usr/bin/storebrowse" |
92 | |
93 | if [[ ${USBDAEMON} = 1 ]] |
94 | then |
95 | ALX_PKG_KEEP+=" usr/lib/systemd/system/ctxusb.service |
96 | usr/lib/udev/rules.d/85-ctxusbd.rules |
97 | opt/Citrix/ICAClient/ctx_usb_isactive |
98 | opt/Citrix/ICAClient/usb.conf |
99 | opt/Citrix/ICAClient/VDGUSB.DLL |
100 | opt/Citrix/ICAClient/ctxusbd |
101 | opt/Citrix/ICAClient/ctxusb |
102 | usr/bin/ctx_usb_isactive |
103 | usr/bin/ctxusb |
104 | usr/sbin/ctxusbd |
105 | etc/tmpfiles.d/ctxusb.conf" |
106 | fi |
107 | |
108 | sminclude mtools udev systemd alx-split |
109 | |
110 | # += to add injection files (alx.sminc) |
111 | SRC_URI+=( |
112 | http://download2.citrix.com/FILES/en/products/Linux${PVER:0:2}/${SRCFILE} |
113 | mirror://ica-client/${SRCFILE} |
114 | ) |
115 | |
116 | if [[ ${USBDAEMON} = 1 ]] |
117 | then |
118 | SRC_URI+=( mirror://ica-client/ctxusbd.service |
119 | mirror://ica-client/ctxusbd.rules |
120 | mirror://ica-client/ctxusbd.tmpfilesd ) |
121 | fi |
122 | |
123 | if [[ ${NOX11COMPONENTS} = 1 ]] |
124 | then |
125 | SRC_URI+=( mirror://ica-client/${PLATFORM_SDK_SRCFILE} ) |
126 | fi |
127 | |
128 | install_from_psf() |
129 | { |
130 | local psf line type file symlink pkg attr user group |
131 | psf="$1" |
132 | |
133 | minstalldir /opt/Citrix/ICAClient || die |
134 | |
135 | cat ${psf} | while read line |
136 | do |
137 | set $line |
138 | type="$1" |
139 | file="$2" |
140 | case $type in |
141 | s|h) |
142 | symlink="$3" |
143 | shift |
144 | ;; |
145 | d|f) |
146 | symlink="" |
147 | ;; |
148 | esac |
149 | |
150 | pkg="$3" |
151 | attr="$4" |
152 | user="$5" |
153 | group="$6" |
154 | |
155 | case ${file} in |
156 | .) continue ;; |
157 | esac |
158 | |
159 | case ${type} in |
160 | d) |
161 | minstalldir /opt/Citrix/ICAClient/${file} || die |
162 | ;; |
163 | f) |
164 | case ${attr} in |
165 | 555) minstallexec ${file} /opt/Citrix/ICAClient/${file} || die ;; |
166 | 444) minstallfile ${file} /opt/Citrix/ICAClient/${file} || die ;; |
167 | esac |
168 | ;; |
169 | s) |
170 | mlink ${symlink} /opt/Citrix/ICAClient/${file} || die |
171 | ;; |
172 | h) |
173 | mlink ${symlink} /opt/Citrix/ICAClient/${file} || die |
174 | ;; |
175 | esac |
176 | done |
177 | } |
178 | |
179 | src_prepare() |
180 | { |
181 | munpack ${SRCFILE} ${SRCDIR} || die |
182 | if [[ ${NOX11COMPONENTS} = 1 ]] |
183 | then |
184 | munpack ${PLATFORM_SDK_SRCFILE} ${SRCDIR} || die |
185 | fi |
186 | cd ${SRCDIR}/linuxx86/linuxx86.cor |
187 | |
188 | sed 's:###ICAROOT###:/opt/Citrix/ICAClient:g' usb/ctxusbd.rc usb/ica-usb.rules || die |
189 | } |
190 | |
191 | alx_generic_src_install() |
192 | { |
193 | cd ${SRCDIR}/linuxx86/linuxx86.cor |
194 | |
195 | minstalldir /opt/Citrix/ICAClient || die |
196 | # read psf file and install files and symlinks |
197 | install_from_psf ${SRCDIR}/linuxx86/linuxx86.psf || die |
198 | |
199 | # eula symlink is a must or wfica and co will not find UIDialog.so |
200 | mlink ./nls/en.UTF-8/eula.txt /opt/Citrix/ICAClient/eula.txt || die |
201 | mlink ../en.UTF-8/eula.txt /opt/Citrix/ICAClient/nls/en/eula.txt || die |
202 | |
203 | # symlink some inis to config dir from nls dir |
204 | minstalldir /opt/Citrix/ICAClient/config || die |
205 | mlink ../nls/en/appsrv.template /opt/Citrix/ICAClient/config/appsrv.template || die |
206 | mlink ../nls/en/module.ini /opt/Citrix/ICAClient/config/module.ini || die |
207 | mlink ../nls/en/wfclient.template /opt/Citrix/ICAClient/config/wfclient.template || die |
208 | |
209 | # make this installation a server installation to seperate config files for every user |
210 | memptyfile /opt/Citrix/ICAClient/config/.server || die |
211 | |
212 | # create wfica.sh |
213 | MCONFIG="/opt/Citrix/ICAClient/wfica.sh" |
214 | mclearconfig || die |
215 | maddconfig '#!/bin/sh' || die |
216 | maddconfig 'ICAROOT=/opt/Citrix/ICAClient' || die |
217 | maddconfig 'export ICAROOT' || die |
218 | maddconfig 'LD_LIBRARY_PATH=${ICAROOT}/lib' || die |
219 | maddconfig 'export LD_LIBRARY_PATH' || die |
220 | maddconfig '$ICAROOT/wfica -file $1' || die |
221 | mchmod 0755 /opt/Citrix/ICAClient/wfica.sh || die |
222 | |
223 | # create wfica_assoc.sh |
224 | MCONFIG="/opt/Citrix/ICAClient/wfica_assoc.sh" |
225 | mclearconfig || die |
226 | maddconfig '#!/bin/sh' || die |
227 | maddconfig 'ICAROOT=/opt/Citrix/ICAClient' || die |
228 | maddconfig 'export ICAROOT' || die |
229 | maddconfig '$ICAROOT/wfica -associate -fileparam $1' || die |
230 | mchmod 0755 /opt/Citrix/ICAClient/wfica_assoc.sh || die |
231 | |
232 | # install wrappers to prevent slowdowns with other locales than 'C' |
233 | minstalldir /usr/bin || die |
234 | MCONFIG="/usr/bin/wfica" |
235 | mclearconfig || die |
236 | maddconfig 'env LC_ALL="" LANG="" LD_LIBRARY_PATH="/opt/Citrix/ICAClient/lib" /opt/Citrix/ICAClient/wfica $*' || die |
237 | mchmod 0755 /usr/bin/wfica || die |
238 | MCONFIG="/usr/bin/pnabrowse" |
239 | mclearconfig || die |
240 | maddconfig 'env LC_ALL="" LANG="" LD_LIBRARY_PATH="/opt/Citrix/ICAClient/lib" /opt/Citrix/ICAClient/util/pnabrowse $*' || die |
241 | mchmod 0755 /usr/bin/pnabrowse || die |
242 | MCONFIG="/usr/bin/storebrowse" |
243 | mclearconfig || die |
244 | maddconfig 'env LC_ALL="" LANG="" LD_LIBRARY_PATH="/opt/Citrix/ICAClient/lib" /opt/Citrix/ICAClient/util/storebrowse $*' || die |
245 | mchmod 0755 /usr/bin/storebrowse || die |
246 | |
247 | # fixes some hardcoded pathes |
248 | minstalldir /etc/env.d || die |
249 | MCONFIG="/etc/env.d/10ica-client" |
250 | mclearconfig || die |
251 | maddconfig 'ICAROOT=/opt/Citrix/ICAClient' || die |
252 | |
253 | # # set default browserprotocol to tcp/ip |
254 | # # ( citrix named this in their config as UDP) |
255 | # sed -i "s:^\(BrowserProtocol=\).*:\1UDP:" ${BINDIR}/opt/Citrix/ICAClient/config/wfclient.template || die |
256 | # |
257 | # newer XenApp use https |
258 | sed -i "s:^\(BrowserProtocol=\).*:\1HTTPonTCP:" ${BINDIR}/opt/Citrix/ICAClient/config/wfclient.template || die |
259 | |
260 | # auto enable com port mapping for com1 and com2 |
261 | sed -i 's:^\(\[WFClient\]\):\1\nComPort1=/dev/ttyS1\nComPort2=/dev/ttyS2\nLastComPortNum=2\n:' \ |
262 | ${BINDIR}/opt/Citrix/ICAClient/config/wfclient.template || die |
263 | |
264 | if [[ ${USBDAEMON} = 1 ]] |
265 | then |
266 | cd ${SRCDIR}/linuxx86/linuxx86.cor/usb |
267 | mcopy -a \* /opt/Citrix/ICAClient || die |
268 | mdelete /opt/Citrix/ICAClient/ctxusbd.rc || die |
269 | minstallunit ctxusbd.service || die |
270 | minstalludevrule ctxusbd.rules 85-ctxusbd.rules || die |
271 | minstalldir /usr/bin || die |
272 | mlink /opt/Citrix/ICAClient/ctx_usb_isactive /usr/bin/ctx_usb_isactive || die |
273 | mlink /opt/Citrix/ICAClient/ctxusb /usr/bin/ctxusb || die |
274 | minstalldir /usr/sbin || die |
275 | mlink /opt/Citrix/ICAClient/ctxusbd /usr/sbin/ctxusbd || die |
276 | minstalltmp ctxusbd.tmpfilesd ctxusbd.conf || die |
277 | fi |
278 | |
279 | if [[ ${NOX11COMPONENTS} = 1 ]] |
280 | then |
281 | cd ${SRCDIR}/CitrixPluginSDK |
282 | # replace binaries |
283 | minstallexec bin/pnabrowse.no_X /opt/Citrix/ICAClient/util/pnabrowse || die |
284 | minstallexec bin/storebrowse.no_X /opt/Citrix/ICAClient/util/storebrowse || die |
285 | minstallexec bin/wfica_for_plugins /opt/Citrix/ICAClient/wfica || die |
286 | minstallexec UIDialogLib/lib/UIDialogLib.so /opt/Citrix/ICAClient/lib/UIDialogLib.so || die |
287 | fi |
288 | |
289 | # insert our company cert |
290 | mcinjectfile ESA.pem /opt/Citrix/ICAClient/keystore/cacerts/ || die |
291 | # rehash all certificates |
292 | ICAROOT=${BINDIR}/opt/Citrix/ICAClient/keystore/cacerts ${BINDIR}/opt/Citrix/ICAClient/util/ctx_rehash || die |
293 | } |
294 | |
295 | preinstall() |
296 | { |
297 | add_conf_prot_mask /etc/env.d |
298 | } |
299 | |
300 | postinstall() |
301 | { |
302 | if [[ ${USBDAEMON} = 1 ]] |
303 | then |
304 | [ -d ${MROOT}/run/ctxusbd ] || install -d ${MROOT}/run/ctxusbd |
305 | mstartunit ctxusbd.service |
306 | fi |
307 | } |
308 | |
309 | postremove() |
310 | { |
311 | # always try to stop this service |
312 | mstopunit ctxusbd.service |
313 | } |