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