Magellan Linux

Annotation of /smage/branches/alx-0_6_0/core/ica-client/ica-client-11.100-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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