Contents of /smage/trunk/core/ica-client/ica-client-12.1.0-r5.smage2
Parent Directory | Revision Log
Revision 5381 -
(show annotations)
(download)
Mon Jan 13 12:30:10 2014 UTC (10 years, 4 months ago) by niro
File size: 5419 byte(s)
Mon Jan 13 12:30:10 2014 UTC (10 years, 4 months ago) by niro
File size: 5419 byte(s)
-keep pnabrowse, disabled usbdaemon and fixed postremove
1 | # $Id$ |
2 | |
3 | PNAME="ica-client" |
4 | PVER="12.1.0" |
5 | PBUILD="r5" |
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 | |
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.34 |
28 | >= x11-libs/gdk-pixbuf-2.26 |
29 | >= dev-libs/atk-2.6 |
30 | >= x11-libs/cairo-1.12 |
31 | >= x11-libs/pango-1.32 |
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-185" |
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_PKG_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_PKG_KEEP+=" opt/ica-client/CHARICONV.DLL" |
63 | |
64 | # needed for basic session encryption |
65 | ALX_PKG_KEEP+=" opt/ica-client/PDCRYPT1.DLL" |
66 | |
67 | # proxy support, needed by wfica |
68 | ALX_PKG_KEEP+=" opt/ica-client/libproxy.so" |
69 | |
70 | # wfica configuration files |
71 | ALX_PKG_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_PKG_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_PKG_KEEP+=" opt/ica-client/nls/C |
83 | opt/ica-client/nls/en/Wfica" |
84 | |
85 | # keep UTF-8 too |
86 | ALX_PKG_KEEP+=" opt/ica-client/nls/en/UTF-8/Wfica" |
87 | |
88 | # required data files |
89 | ALX_PKG_KEEP+=" opt/ica-client/gtk |
90 | opt/ica-client/icons/receiver.png" |
91 | |
92 | # keep pnabrowse utility for mcore-tools |
93 | ALX_PKG_KEEP+=" opt/ica-client/util/pnabrowse" |
94 | |
95 | # compat symlink |
96 | if [[ ${COMPATSYMLINK} = 1 ]] |
97 | then |
98 | ALX_PKG_KEEP+=" usr/lib/ICAClient" |
99 | fi |
100 | |
101 | if [[ ${USBDAEMON} = 1 ]] |
102 | then |
103 | ALX_PKG_KEEP+=" etc/rc.d/init.d/ctxusbd |
104 | lib/udev/rules.d/85-ctxusbd.rules |
105 | opt/ica-client/ctx_usb_isactive |
106 | opt/ica-client/usb.conf |
107 | opt/ica-client/VDGUSB.DLL |
108 | opt/ica-client/ctxusbd |
109 | opt/ica-client/ctxusb" |
110 | fi |
111 | |
112 | sminclude mtools alx-split |
113 | |
114 | SRC_URI=( |
115 | http://download2.citrix.com/FILES/en/products/Linux${PVER:0:2}/${SRCFILE} |
116 | mirror://ica-client/${SRCFILE} |
117 | ) |
118 | |
119 | if [[ ${USBDAEMON} = 1 ]] |
120 | then |
121 | SRC_URI+=( http://download2.citrix.com/FILES/en/products/Linux${PVER:0:2}/${USB_SRCFILE} |
122 | mirror://ica-client/${USB_SRCFILE} |
123 | mirror://ica-client/ctxusbd.service |
124 | mirror://ica-client/ctxusbd.rules |
125 | mirror://ica-client/ctxusbd.tmpfilesd ) |
126 | fi |
127 | |
128 | src_prepare() |
129 | { |
130 | munpack ${SRCFILE} ${SRCDIR} || die |
131 | |
132 | if [[ ${USBDAEMON} = 1 ]] |
133 | then |
134 | munpack ${USB_SRCFILE} ${USB_SRCDIR} || die |
135 | fi |
136 | } |
137 | |
138 | alx_generic_src_install() |
139 | { |
140 | cd ${SRCDIR}/opt/Citrix/ICAClient |
141 | |
142 | minstalldir /opt/ica-client || die |
143 | mcopy -a \* /opt/ica-client || die |
144 | |
145 | # symlink some inis to config dir from nls dir |
146 | minstalldir /opt/ica-client/config || die |
147 | mlink ../nls/en/appsrv.ini /opt/ica-client/config/appsrv.ini || die |
148 | mlink ../nls/en/module.ini /opt/ica-client/config/module.ini || die |
149 | mlink ../nls/en/wfclient.ini /opt/ica-client/config/wfclient.ini || die |
150 | |
151 | # install wrappers to prevent slowdowns with other locales than 'C' |
152 | minstalldir /usr/bin || die |
153 | MCONFIG="/usr/bin/wfcmgr" |
154 | mclearconfig || die |
155 | maddconfig 'env LC_ALL="" LANG="" LD_LIBRARY_PATH="/opt/ica-client" /opt/ica-client/wfcmgr.bin $*' || die |
156 | MCONFIG="/usr/bin/wfica" |
157 | mclearconfig || die |
158 | maddconfig 'env LC_ALL="" LANG="" LD_LIBRARY_PATH="/opt/ica-client" /opt/ica-client/wfica $*' || die |
159 | mchmod 0755 /usr/bin/wfcmgr || die |
160 | mchmod 0755 /usr/bin/wfica || die |
161 | |
162 | # fixes some hardcoded pathes |
163 | minstalldir /etc/env.d || die |
164 | MCONFIG="/etc/env.d/10ica-client" |
165 | mclearconfig || die |
166 | maddconfig 'ICAROOT=/opt/ica-client' || die |
167 | |
168 | # compat symlink |
169 | if [[ ${COMPATSYMLINK} = 1 ]] |
170 | then |
171 | minstalldir /usr/lib || die |
172 | mlink /opt/ica-client /usr/lib/ICAClient || die |
173 | fi |
174 | |
175 | # set default browserprotocol to tcp/ip |
176 | # ( citrix named this in their config as UDP) |
177 | sed -i "s:^\(BrowserProtocol=\).*:\1UDP:" ${BINDIR}/opt/ica-client/config/wfclient.ini || die |
178 | |
179 | # auto enable com port mapping for com1 and com2 |
180 | sed -i 's:^\(\[WFClient\]\):\1\nComPort1=/dev/ttyS1\nComPort2=/dev/ttyS2\nLastComPortNum=2\n:' \ |
181 | ${BINDIR}/opt/ica-client/config/wfclient.ini || die |
182 | |
183 | if [[ ${USBDAEMON} = 1 ]] |
184 | then |
185 | cd ${USB_SRCDIR}/opt/Citrix/ICAClient |
186 | mcopy -a \* /opt/ica-client || die |
187 | minstallunit ctxusbd.service || die |
188 | minstalludevrule ctxusbd.rules 85-ctxusbd.rules || die |
189 | minstalldir /usr/bin || die |
190 | mlink /opt/ica-client/ctx_usb_isactive /usr/bin/ctx_usb_isactive || die |
191 | mlink /opt/ica-client/ctxusb /usr/bin/ctxusb || die |
192 | minstalldir /usr/sbin || die |
193 | mlink /opt/ica-client/ctxusbd /usr/sbin/ctxusbd || die |
194 | minstalltmp ctxusbd.tmpfilesd ctxusbd.conf || die |
195 | fi |
196 | } |
197 | |
198 | preinstall() |
199 | { |
200 | add_conf_prot_mask /etc/env.d |
201 | } |
202 | |
203 | postinstall() |
204 | { |
205 | if [[ ${USBDAEMON} = 1 ]] |
206 | then |
207 | [ -d ${MROOT}/run/ctxusbd ] || install -d ${MROOT}/run/ctxusbd |
208 | mstartunit ctxusbd.service |
209 | fi |
210 | } |
211 | |
212 | postremove() |
213 | { |
214 | if [[ ${USBDAEMON} = 1 ]] |
215 | then |
216 | mstopunit ctxusbd.service |
217 | fi |
218 | } |