Magellan Linux

Contents of /smage/trunk/core/ica-client/ica-client-13.0.0.256735-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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