Magellan Linux

Contents of /smage/branches/alx-0_6_0/core/ica-client/ica-client-12.1.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7003 - (show annotations) (download)
Tue Aug 11 10:32:19 2015 UTC (8 years, 9 months ago) by niro
File size: 5713 byte(s)
auto added: ver bump to 12.1.0-r1
1 # $Id$
2
3 PNAME="ica-client"
4 PVER="12.1.0"
5 PBUILD="r1"
6
7 PCATEGORIE="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 # install /usr/lib/ICAClient compat symlink, 1=true/ 0=false
17 COMPATSYMLINK=1
18
19 DEPEND=">= x11-libs/libXaw-1
20 >= x11-libs/libX11-1.4
21 >= x11-libs/libSM-1.2
22 >= x11-libs/libICE-1
23 >= x11-libs/libXpm-3.5
24 >= x11-libs/libXinerama-1.1
25 >= x11-libs/openmotif-2.3
26 >= x11-libs/libXp-1
27 >= dev-libs/glib2-2.28
28 >= x11-libs/gdk-pixbuf-2.22
29 >= dev-libs/atk-1.33
30 >= x11-libs/cairo-1.10
31 >= x11-libs/pango-1.28
32 >= x11-libs/gtk2+-2.24
33 >= media-fonts/font-adobe-75dpi-1
34 >= media-libs/alsa-lib-1.0.24
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-166"
42
43 # ctxusb daemon
44 USB_PVER="2.2"
45 USB_SRCFILE="ctxusb_${USB_PVER}-1.i386.rpm"
46 USB_SRCDIR="${BUILDDIR}/ctxusb_${USB_PVER}"
47 fi
48
49 SDEPEND=">= app-arch/rpm2targz-9.0
50 >= virtual/sed"
51
52 SRCFILE="ICAClient-${PVER}-0.i386.rpm"
53 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
54
55 # only keep the essential files to run wfica
56 ALX_ONLY_KEEP="etc/env.d
57 usr/bin/wfica
58 opt/ica-client/wfica
59 opt/ica-client/wfica.sh"
60
61 # needed to run wfica
62 ALX_ONLY_KEEP+=" opt/ica-client/CHARICONV.DLL"
63
64 # needed for basic session encryption
65 ALX_ONLY_KEEP+=" opt/ica-client/PDCRYPT1.DLL"
66
67 # proxy support, needed by wfica
68 ALX_ONLY_KEEP+=" opt/ica-client/libproxy.so"
69
70 # wfica configuration files
71 ALX_ONLY_KEEP+=" opt/ica-client/config
72 opt/ica-client/nls/en/appsrv.ini
73 opt/ica-client/nls/en/module.ini
74 opt/ica-client/nls/en/wfclient.ini"
75
76 # keyboard layouts
77 ALX_ONLY_KEEP+=" opt/ica-client/keyboard/keyboard.ini
78 opt/ica-client/keyboard/automatic.kbd
79 opt/ica-client/keyboard/linux.kbd"
80
81 # language support
82 ALX_ONLY_KEEP+=" opt/ica-client/nls/C
83 opt/ica-client/nls/en/Wfica"
84
85 # keep UTF-8 too
86 ALX_ONLY_KEEP+=" opt/ica-client/nls/en/UTF-8/Wfica"
87
88 # required data files
89 ALX_ONLY_KEEP+=" opt/ica-client/gtk
90 opt/ica-client/icons/receiver.png"
91
92 # pnabrowser and certificates for storefront support
93 ALX_ONLY_KEEP+=" opt/ica-client/util/pnabrowse
94 opt/ica-client/nls/en/pna.nls
95 opt/ica-client/nls/en/UTF-8/pna.nls
96 opt/ica-client/keystore
97 opt/ica-client/libctxssl.so"
98
99 # compat symlink
100 if [[ ${COMPATSYMLINK} = 1 ]]
101 then
102 ALX_ONLY_KEEP+=" usr/lib/ICAClient"
103 fi
104
105 if [[ ${USBDAEMON} = 1 ]]
106 then
107 ALX_ONLY_KEEP+=" etc/rc.d/init.d/ctxusbd
108 lib/udev/rules.d/85-ctxusbd.rules
109 opt/ica-client/ctx_usb_isactive
110 opt/ica-client/usb.conf
111 opt/ica-client/VDGUSB.DLL
112 opt/ica-client/ctxusbd
113 opt/ica-client/ctxusb"
114 fi
115
116 sminclude mtools alx-split
117
118 SRC_URI=(
119 http://download2.citrix.com/FILES/en/products/Linux${PVER:0:2}/${SRCFILE}
120 mirror://ica-client/${SRCFILE}
121 )
122
123 if [[ ${USBDAEMON} = 1 ]]
124 then
125 SRC_URI+=( http://download2.citrix.com/FILES/en/products/Linux${PVER:0:2}/${USB_SRCFILE}
126 mirror://ica-client/${USB_SRCFILE}
127 mirror://ica-client/ctxusbd.service
128 mirror://ica-client/ctxusbd.rules
129 mirror://ica-client/ctxusbd.tmpfilesd )
130 fi
131
132 src_prepare()
133 {
134 munpack ${SRCFILE} ${SRCDIR} || die
135
136 if [[ ${USBDAEMON} = 1 ]]
137 then
138 munpack ${USB_SRCFILE} ${USB_SRCDIR} || die
139 fi
140 }
141
142 alx_generic_src_install()
143 {
144 cd ${SRCDIR}/opt/Citrix/ICAClient
145
146 minstalldir /opt/ica-client || die
147 mcopy -a \* /opt/ica-client || die
148
149 # symlink some inis to config dir from nls dir
150 minstalldir /opt/ica-client/config || die
151 mlink ../nls/en/appsrv.ini /opt/ica-client/config/appsrv.ini || die
152 mlink ../nls/en/module.ini /opt/ica-client/config/module.ini || die
153 mlink ../nls/en/wfclient.ini /opt/ica-client/config/wfclient.ini || die
154
155 # install wrappers to prevent slowdowns with other locales than 'C'
156 minstalldir /usr/bin || die
157 MCONFIG="/usr/bin/wfcmgr"
158 mclearconfig || die
159 maddconfig 'env LC_ALL="" LANG="" LD_LIBRARY_PATH="/opt/ica-client" /opt/ica-client/wfcmgr.bin $*' || die
160 MCONFIG="/usr/bin/wfica"
161 mclearconfig || die
162 maddconfig 'env LC_ALL="" LANG="" LD_LIBRARY_PATH="/opt/ica-client" /opt/ica-client/wfica $*' || die
163 mchmod 0755 /usr/bin/wfcmgr || die
164 mchmod 0755 /usr/bin/wfica || die
165
166 # fixes some hardcoded pathes
167 minstalldir /etc/env.d || die
168 MCONFIG="/etc/env.d/10ica-client"
169 mclearconfig || die
170 maddconfig 'ICAROOT=/opt/ica-client' || die
171
172 # compat symlink
173 if [[ ${COMPATSYMLINK} = 1 ]]
174 then
175 minstalldir /usr/lib || die
176 mlink /opt/ica-client /usr/lib/ICAClient || die
177 fi
178
179 # # set default browserprotocol to tcp/ip
180 # # ( citrix named this in their config as UDP)
181 # sed -i "s:^\(BrowserProtocol=\).*:\1UDP:" \
182 # ${BINDIR}/opt/ica-client/config/wfclient.ini || die
183 #
184 # newer XenApp use https
185 sed -i "s:^\(BrowserProtocol=\).*:\1HTTPonTCP:" \
186 ${BINDIR}/opt/ica-client/config/wfclient.ini || die
187
188 # auto enable com port mapping for com1 and com2
189 sed -i 's:^\(\[WFClient\]\):\1\nComPort1=/dev/ttyS1\nComPort2=/dev/ttyS2\nLastComPortNum=2\n:' \
190 ${BINDIR}/opt/ica-client/config/wfclient.ini || die
191
192 if [[ ${USBDAEMON} = 1 ]]
193 then
194 cd ${USB_SRCDIR}/opt/Citrix/ICAClient
195 mcopy -a \* /opt/ica-client || die
196 minstallunit ctxusbd.service || die
197 minstalludevrule ctxusbd.rules 85-ctxusbd.rules || die
198 minstalldir /usr/bin || die
199 mlink /opt/ica-client/ctx_usb_isactive /usr/bin/ctx_usb_isactive || die
200 mlink /opt/ica-client/ctxusb /usr/bin/ctxusb || die
201 minstalldir /usr/sbin || die
202 mlink /opt/ica-client/ctxusbd /usr/sbin/ctxusbd || die
203 minstalltmp ctxusbd.tmpfilesd ctxusbd.conf || die
204 fi
205 }
206
207 preinstall()
208 {
209 add_conf_prot_mask /etc/env.d
210 }
211
212 postinstall()
213 {
214 if [[ ${USBDAEMON} = 1 ]]
215 then
216 [ -d ${MROOT}/run/ctxusbd ] || install -d ${MROOT}/run/ctxusbd
217 mstartunit ctxusbd.service
218 fi
219 }
220
221 postremove()
222 {
223 if [[ ${USBDAEMON} = 1 ]]
224 then
225 mstopunit ctxusbd.service
226 fi
227 }