Contents of /trunk/nonfree/ica-client/ica-client-12.0-r1.smage2
Parent Directory | Revision Log
Revision 11783 -
(show annotations)
(download)
Wed Apr 11 20:41:37 2012 UTC (12 years, 1 month ago) by niro
File size: 4214 byte(s)
Wed Apr 11 20:41:37 2012 UTC (12 years, 1 month ago) by niro
File size: 4214 byte(s)
auto added: ver bump to 12.0-r1
1 | # $Id$ |
2 | |
3 | PNAME="ica-client" |
4 | PVER="12.0" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="net-misc" |
8 | |
9 | DESCRIPTION="Citrix ICA client." |
10 | HOMEPAGE="http://www.citrix.com/" |
11 | |
12 | # install usb daemon, true/false |
13 | USBDAEMON="false" |
14 | SPECIAL_VARS="USBDAEMON" |
15 | |
16 | DEPEND=">= x11-libs/libXaw-1 |
17 | >= x11-libs/libX11-1.4 |
18 | >= x11-libs/libSM-1.2 |
19 | >= x11-libs/libICE-1 |
20 | >= x11-libs/libXpm-3.5 |
21 | >= x11-libs/libXinerama-1.1 |
22 | >= x11-libs/openmotif-2.3 |
23 | >= x11-libs/libXp-1 |
24 | >= media-fonts/font-adobe-75dpi-1 |
25 | >= media-libs/alsa-lib-1.0.24 |
26 | >= media-libs/libogg-1.3 |
27 | >= media-libs/libvorbis-1.3" |
28 | |
29 | SDEPEND=">= app-arch/rpm2targz-9.0 |
30 | >= dev-util/desktop-file-utils-0.10" |
31 | |
32 | if [[ ${USBDAEMON} = true ]] |
33 | then |
34 | DEPEND="${DEPEND} |
35 | >= sys-fs/udev-170 |
36 | >= sys-libs/libcap-2.22" |
37 | |
38 | # ctxusb daemon |
39 | USB_PVER="2.0" |
40 | USB_SRCFILE="ctxusb-${USB_PVER}-1.i386.rpm" |
41 | USB_SRCDIR="${BUILDDIR}/ctxusb-${USB_PVER}" |
42 | fi |
43 | |
44 | SRCFILE="ICAClient-${PVER}-1.i386.rpm" |
45 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
46 | |
47 | sminclude mtools xdg |
48 | |
49 | SRC_URI=( |
50 | http://download2.citrix.com/FILES/en/products/Linux${PVER:0:2}/${SRCFILE} |
51 | mirror://${PNAME}/${SRCFILE} |
52 | ) |
53 | |
54 | if [[ ${USBDAEMON} = true ]] |
55 | then |
56 | SRC_URI=( ${SRC_URI[*]} |
57 | http://download2.citrix.com/FILES/en/products/Linux${PVER:0:2}/${USB_SRCFILE} |
58 | mirror://ica-client/${USB_SRCFILE} |
59 | mirror://ica-client/ctxusbd.rc |
60 | mirror://ica-client/ctxusbd.rules |
61 | ) |
62 | fi |
63 | |
64 | # fake atm |
65 | UP2DATE="echo ${PVER}" |
66 | |
67 | src_prepare() |
68 | { |
69 | munpack ${SRCFILE} ${SRCDIR} || die |
70 | |
71 | if [[ ${USBDAEMON} = true ]] |
72 | then |
73 | munpack ${USB_SRCFILE} ${USB_SRCDIR} || die |
74 | fi |
75 | } |
76 | |
77 | src_install() |
78 | { |
79 | cd ${SRCDIR}/opt/Citrix/ICAClient |
80 | |
81 | minstalldir /opt/ica-client || die |
82 | cp -a * ${BINDIR}/opt/ica-client || die |
83 | |
84 | # install icons in a proper directory |
85 | minstallpixmap icons/session.xpm || die |
86 | minstallpixmap icons/manager.png || die |
87 | |
88 | # and create a desktop file |
89 | minstall_desktop_icon \ |
90 | --name "Citrix Program Neighbourhood" \ |
91 | --file wfcmgr \ |
92 | --exec /usr/bin/wfcmgr \ |
93 | --icon manager.xpm \ |
94 | --categories Network,Application || die |
95 | |
96 | # install browser plugin to a proper location |
97 | minstalldir /usr/$(mlibdir)/nsbrowser/plugins || die |
98 | mlink /opt/ica-client/npica.so /usr/$(mlibdir)/nsbrowser/plugins/npica.so || die |
99 | |
100 | # symlink some inis to config dir from nls dir |
101 | minstalldir /opt/ica-client/config || die |
102 | mlink ../nls/en/appsrv.ini /opt/ica-client/config/appsrv.ini || die |
103 | mlink ../nls/en/module.ini /opt/ica-client/config/module.ini || die |
104 | mlink ../nls/en/wfclient.ini /opt/ica-client/config/wfclient.ini || die |
105 | |
106 | # install wrappers to prevent slowdowns with other locales than 'C' |
107 | minstalldir /usr/bin || die |
108 | echo 'env LC_ALL="" LANG="" LD_LIBRARY_PATH="/opt/ica-client" /opt/ica-client/wfcmgr.bin $*' > ${BINDIR}/usr/bin/wfcmgr || die |
109 | echo 'env LC_ALL="" LANG="" LD_LIBRARY_PATH="/opt/ica-client" /opt/ica-client/wfica $*' > ${BINDIR}/usr/bin/wfica || die |
110 | mchmod 0755 /usr/bin/wfcmgr || die |
111 | mchmod 0755 /usr/bin/wfica || die |
112 | |
113 | # fixes some hardcoded pathes |
114 | minstalldir /etc/env.d || die |
115 | echo 'ICAROOT=/opt/ica-client' > ${BINDIR}/etc/env.d/10ica-client || die |
116 | |
117 | # set default browserprotocol to tcp/ip |
118 | # ( citrix named this in their config as UDP) |
119 | sed -i "s:^\(BrowserProtocol=\).*:\1UDP:" ${BINDIR}/opt/ica-client/config/wfclient.ini || die |
120 | |
121 | # auto enable com port mapping for com1 and com2 |
122 | sed -i 's:^\(\[WFClient\]\):\1\nComPort1=/dev/ttyS1\nComPort2=/dev/ttyS2\nLastComPortNum=2\n:' \ |
123 | ${BINDIR}/opt/ica-client/config/wfclient.ini || die |
124 | |
125 | if [[ ${USBDAEMON} = true ]] |
126 | then |
127 | cd ${USB_SRCDIR}/opt/Citrix/ICAClient |
128 | cp -a * ${BINDIR}/opt/ica-client || die |
129 | minstallrc ctxusbd.rc ctxusbd || die |
130 | minstalludevrule ctxusbd.rules 85-ctxusbd.rules || die |
131 | minstalldir /usr/bin || die |
132 | echo 'env LC_ALL="" LANG="" LD_LIBRARY_PATH="/opt/ica-client" /opt/ica-client/ctx_usb_isactive $*' > ${BINDIR}/usr/bin/ctx_usb_isactive || die |
133 | echo 'env LC_ALL="" LANG="" LD_LIBRARY_PATH="/opt/ica-client" /opt/ica-client/ctxusb $*' > ${BINDIR}/usr/bin/ctxusb || die |
134 | mchmod 0755 /usr/bin/ctx_usb_isactive || die |
135 | mchmod 0755 /usr/bin/ctxusb || die |
136 | minstalldir /usr/sbin || die |
137 | echo 'env LC_ALL="" LANG="" LD_LIBRARY_PATH="/opt/ica-client" /opt/ica-client/ctxusbd $*' > ${BINDIR}/usr/sbin/ctxusbd || die |
138 | mchmod 0755 /usr/sbin/ctxusbd || die |
139 | mkeepdir /var/run/ctxusbd || die |
140 | fi |
141 | } |