Magellan Linux

Contents of /smage/trunk/core/ica-client/ica-client-12.1.0-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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