Annotation of /smage/branches/alx-0_6_0/core/ica-client/ica-client-11.100-r2.smage2
Parent Directory | Revision Log
Revision 1880 -
(hide annotations)
(download)
Wed Apr 27 11:50:22 2011 UTC (13 years, 1 month ago) by niro
File size: 6186 byte(s)
Wed Apr 27 11:50:22 2011 UTC (13 years, 1 month ago) by niro
File size: 6186 byte(s)
auto added: ver bump to 11.100-r2
1 | niro | 1878 | # $Id$ |
2 | |||
3 | PNAME="ica-client" | ||
4 | PVER="11.100" | ||
5 | PBUILD="r2" | ||
6 | |||
7 | PCATEGORIE="net-misc" | ||
8 | STATE="unstable" | ||
9 | |||
10 | DESCRIPTION="Citrix ica client" | ||
11 | HOMEPAGE="www.citrix.com" | ||
12 | |||
13 | DEPEND=">= virtual/x11" | ||
14 | |||
15 | SDEPEND=">= app-arch/rpm2targz-9.0 | ||
16 | >= sys-apps/sed-4" | ||
17 | |||
18 | INHERITS="alx" | ||
19 | |||
20 | SRCFILE="ICAClient-${PVER}-1.i386.rpm" | ||
21 | SRCDIR="${BUILDDIR}/${PNAME/-alx/}-${PVER}" | ||
22 | |||
23 | # needed to compile libXp | ||
24 | PRINTPROTO_PVER="1.0.5" | ||
25 | PRINTPROTO_SRCFILE="printproto-${PRINTPROTO_PVER}.tar.bz2" | ||
26 | PRINTPROTO_SRCDIR="${BUILDDIR}/printproto-${PRINTPROTO_PVER}" | ||
27 | |||
28 | # needed by ica-client libs | ||
29 | LIBXP_PVER="1.0.1" | ||
30 | LIBXP_SRCFILE="libXp-${LIBXP_PVER}.tar.bz2" | ||
31 | LIBXP_SRCDIR="${BUILDDIR}/libXp-${LIBXP_PVER}" | ||
32 | |||
33 | # needed to compile motif | ||
34 | XBITMAPS_PVER="1.1.1" | ||
35 | XBITMAPS_SRCFILE="xbitmaps-${XBITMAPS_PVER}.tar.bz2" | ||
36 | XBITMAPS_SRCDIR="${BUILDDIR}/xbitmaps-${XBITMAPS_PVER}" | ||
37 | |||
38 | # needed by ica-client libs | ||
39 | OPENMOTIF_PVER="2.3.3" | ||
40 | OPENMOTIF_SRCFILE="openmotif-${OPENMOTIF_PVER}.tar.gz" | ||
41 | OPENMOTIF_SRCDIR="${BUILDDIR}/openmotif-${OPENMOTIF_PVER}" | ||
42 | |||
43 | # only keep the essential files to run wfica | ||
44 | ALX_ONLY_KEEP="usr/bin/wfica | ||
45 | opt/ica-client/wfica | ||
46 | opt/ica-client/wfica.sh" | ||
47 | |||
48 | # needed to run wfica | ||
49 | ALX_ONLY_KEEP+=" opt/ica-client/CHARICONV.DLL" | ||
50 | |||
51 | # needed for basic session encryption | ||
52 | ALX_ONLY_KEEP+=" opt/ica-client/PDCRYPT1.DLL" | ||
53 | |||
54 | # proxy support, needed by wfica | ||
55 | ALX_ONLY_KEEP+=" opt/ica-client/libproxy.so" | ||
56 | |||
57 | # wfica configuration files | ||
58 | ALX_ONLY_KEEP+=" opt/ica-client/config" | ||
59 | |||
60 | # keyboard layouts | ||
61 | ALX_ONLY_KEEP+=" opt/ica-client/keyboard/keyboard.ini | ||
62 | opt/ica-client/keyboard/automatic.kbd | ||
63 | opt/ica-client/keyboard/linux.kbd" | ||
64 | |||
65 | # language support | ||
66 | ALX_ONLY_KEEP+=" opt/ica-client/nls/C | ||
67 | opt/ica-client/nls/en/Wfica" | ||
68 | |||
69 | # keep UTF-8 too | ||
70 | ALX_ONLY_KEEP+=" opt/ica-client/nls/en/UTF-8/Wfica" | ||
71 | |||
72 | REMOVE_DEPRECATED_MAGE_TARGETS=1 | ||
73 | sminclude mtools alx-split | ||
74 | |||
75 | SRC_URI=( | ||
76 | http://download2.citrix.com/FILES/en/products/Linux${PVER:0:2}/${SRCFILE} | ||
77 | http://www.x.org/releases/individual/proto/${PRINTPROTO_SRCFILE} | ||
78 | http://www.x.org/releases/individual/lib/${LIBXP_SRCFILE} | ||
79 | http://www.x.org/releases/individual/data/${XBITMAPS_SRCFILE} | ||
80 | http://www.motifzone.org/files/public_downloads/openmotif/${OPENMOTIF_PVER%.*}/${OPENMOTIF_PVER}/${OPENMOTIF_SRCFILE} | ||
81 | mirror://ica-client/${SRCFILE} | ||
82 | mirror://printproto/${PRINTPROTO_SRCFILE} | ||
83 | mirror://libXp/${LIBXP_SRCFILE} | ||
84 | mirror://xbitmaps/${XBITMAPS_SRCFILE} | ||
85 | mirror://openmotif/${OPENMOTIF_SRCFILE} | ||
86 | ) | ||
87 | |||
88 | src_prepare() | ||
89 | { | ||
90 | ## printproto | ||
91 | munpack ${PRINTPROTO_SRCFILE} || die | ||
92 | |||
93 | ## libxp | ||
94 | munpack ${LIBXP_SRCFILE} || die | ||
95 | |||
96 | ## xbitmaps | ||
97 | munpack ${XBITMAPS_SRCFILE} || die | ||
98 | |||
99 | ## openmotif | ||
100 | munpack ${OPENMOTIF_SRCFILE} || die | ||
101 | cd ${OPENMOTIF_SRCDIR} || die | ||
102 | # disable compilation of demo binaries | ||
103 | sed -i -e '/^SUBDIRS/{:x;/\\$/{N;bx;};s/[ \t\n\\]*demos//;}' Makefile.am | ||
104 | # add X.Org vendor string to aliases for virtual bindings | ||
105 | echo -e '"The X.Org Foundation"\t\t\t\t\tpc' >>bindings/xmbind.alias | ||
106 | # add missing files to run autoconf successfully | ||
107 | touch NEWS AUTHORS INSTALL COPYING || die | ||
108 | autoreconf -I. --verbose --force --install || die | ||
109 | |||
110 | ## ica-client | ||
111 | install -d ${SRCDIR} | ||
112 | cd ${SRCDIR} | ||
113 | |||
114 | rpm2targz ${SOURCEDIR}/${PNAME}/${SRCFILE} || die | ||
115 | tar --no-same-owner -xvzf ${SRCDIR}/${SRCFILE/.rpm/.tar.gz} || die | ||
116 | } | ||
117 | |||
118 | src_compile() | ||
119 | { | ||
120 | export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:$(find ${BUILDDIR} -maxdepth 1 -mindepth 1 -type d -printf %p:)" | ||
121 | |||
122 | ## printproto | ||
123 | cd ${PRINTPROTO_SRCDIR} | ||
124 | ./configure \ | ||
125 | --prefix=$(pwd) \ | ||
126 | --includedir='${prefix}' \ | ||
127 | --libdir='${prefix}/.libs' \ | ||
128 | || die | ||
129 | mmake || die | ||
130 | # some needed symlinks | ||
131 | ln -snf . X11 || die | ||
132 | ln -snf . extensions || die | ||
133 | |||
134 | ## libxp | ||
135 | cd ${LIBXP_SRCDIR} | ||
136 | ./configure \ | ||
137 | --prefix=$(pwd) \ | ||
138 | --includedir='${prefix}' \ | ||
139 | --libdir='${prefix}/.libs' \ | ||
140 | --disable-static \ | ||
141 | || die | ||
142 | mmake || die | ||
143 | |||
144 | ## xbitmaps | ||
145 | cd ${XBITMAPS_SRCDIR} | ||
146 | ./configure \ | ||
147 | --prefix=$(pwd) \ | ||
148 | --includedir='${prefix}' \ | ||
149 | --libdir='${prefix}/.libs' \ | ||
150 | || die | ||
151 | mmake || die | ||
152 | # some needed symlinks | ||
153 | ln -snf . X11 || die | ||
154 | ln -snf . bitmaps || die | ||
155 | |||
156 | ## openmotif | ||
157 | cd ${OPENMOTIF_SRCDIR} | ||
158 | |||
159 | # fix some anoying warnings | ||
160 | export CFLAGS="${CFLAGS} -fno-strict-aliasing" | ||
161 | export CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" | ||
162 | |||
163 | # tell motif where to find xbitmaps | ||
164 | CFLAGS="${CFLAGS} $(pkg-config --cflags xbitmaps)" \ | ||
165 | mconfigure \ | ||
166 | --with-x \ | ||
167 | --x-libraries=/usr/X11R6/lib \ | ||
168 | --disable-printing \ | ||
169 | --disable-xft \ | ||
170 | --disable-png \ | ||
171 | --disable-jpeg \ | ||
172 | || die | ||
173 | |||
174 | # doens't like optimations | ||
175 | # fix broken libtool: it calles sed and it ends in an infinite loop | ||
176 | mmake -j1 LIBTOOL="$(which libtool)" || die | ||
177 | } | ||
178 | |||
179 | niro | 1880 | alx_generic_src_install() |
180 | niro | 1878 | { |
181 | local libnameso3 | ||
182 | local libnameso2 | ||
183 | local libnameso1 | ||
184 | local lib | ||
185 | |||
186 | ## printproto | ||
187 | # nothing | ||
188 | |||
189 | ## libxp | ||
190 | # libs only | ||
191 | cd ${LIBXP_SRCDIR} | ||
192 | minstalldir /opt/ica-client || die | ||
193 | minstalllib src/.libs/libXp.so.*.*.* /opt/ica-client || die | ||
194 | |||
195 | ## xbitmaps | ||
196 | # nothing | ||
197 | |||
198 | ## openmotif | ||
199 | # libs only | ||
200 | cd ${OPENMOTIF_SRCDIR} | ||
201 | minstalldir /opt/ica-client || die | ||
202 | niro | 1879 | minstalllib lib/Xm/.libs/libXm.so.*.*.* || die |
203 | niro | 1878 | |
204 | ## ica-client | ||
205 | cd ${SRCDIR}/usr/lib/ICAClient | ||
206 | |||
207 | cp -a * ${BINDIR}/opt/ica-client || die | ||
208 | |||
209 | # symlink some inis to config dir from nls dir | ||
210 | minstalldir /opt/ica-client/config || die | ||
211 | mlink ../nls/en/appsrv.ini /opt/ica-client/config/appsrv.ini || die | ||
212 | mlink ../nls/en/module.ini /opt/ica-client/config/module.ini || die | ||
213 | mlink ../nls/en/wfclient.ini /opt/ica-client/config/wfclient.ini || die | ||
214 | |||
215 | # install wrappers to prevent slowdowns with other locales than 'C' | ||
216 | echo 'env LC_ALL="" LANG="" LD_LIBRARY_PATH="/opt/ica-client" /opt/ica-client/wfcmgr.bin $*' > ${BINDIR}/usr/bin/wfcmgr || die | ||
217 | echo 'env LC_ALL="" LANG="" LD_LIBRARY_PATH="/opt/ica-client" /opt/ica-client/wfica $*' > ${BINDIR}/usr/bin/wfica || die | ||
218 | mchmod 0755 /usr/bin/wfcmgr || die | ||
219 | mchmod 0755 /usr/bin/wfica || die | ||
220 | |||
221 | # fixes some hardcoded pathes | ||
222 | minstalldir /etc/env.d || die | ||
223 | echo 'ICAROOT=/opt/ica-client' > ${BINDIR}/etc/env.d/10ica-client || die | ||
224 | |||
225 | # set default browserprotocol to tcp/ip | ||
226 | # ( citrix named this in their config as UDP) | ||
227 | sed -i "s:^\(BrowserProtocol=\).*:\1UDP:" \ | ||
228 | ${BINDIR}/opt/ica-client/config/wfclient.ini || die | ||
229 | |||
230 | # auto enable com port mapping for com1 and com2 | ||
231 | sed -i 's:^\(\[WFClient\]\):\1\nComPort1=/dev/ttyS1\nComPort2=/dev/ttyS2\nLastComPortNum=2\n:' \ | ||
232 | ${BINDIR}/opt/ica-client/config/wfclient.ini || die | ||
233 | } |