1 # Maintainer: Vryali [vryali {at} gmail -dot- com]
2 # Former Maintainer: LeeF <leef (at) hushmail (dot) com
3 # Original Author : Andrwe <lord-weber-andrwe (at) renona-studios (dot) org>
5 pkgname="citrix-client"
8 pkgdesc="Provides XenApp(Citrix) for linux (x86_64 & i686)."
10 url="http://www.citrix.com"
11 source=('http://download.citrix.com.edgesuite.net/akdlm/6527/linuxx86-12.0.0.189834.tar.gz?__gda__=1321897125_2ee2fd1ec07c8aa513106fd80015c832&__dlmgda__=1321983225_fe34ab5440b7215ddeb18dd0a809b471&fileExt=.gz')
12 arch=('i686' 'x86_64')
14 md5sums=('d99029de72f8bb6ada8297d16f39ad90')
34 instdir="/usr/lib/ICAClient"
59 instdir="/usr/lib32/ICAClient"
63 install=citrix-client.install
66 # Create folder structure
67 mkdir -p "${pkgdir}${instdir}"
68 mkdir -p "${pkgdir}/usr/lib/mozilla/plugins"
69 mkdir -p "${pkgdir}/usr/bin/"
72 cp -r ./linuxx86/linuxx86.cor/* "${pkgdir}${instdir}"/
73 cp ./setupwfc "${pkgdir}${instdir}"/
75 # Go to package directory
76 cd "${pkgdir}${instdir}"/
78 # Create symlinks for the Npica.ad binary
79 ln -s ./nls/en/Npica.ad ./Npica.ad
80 ln -s ./Npica.ad ./Npica
82 # Copy EULA to program root directory
83 cp ${srcdir}/linuxx86/linuxx86.cor/nls/en/eula.txt ./
85 # Copy default configuration files to config directory of the program and setting them readable
86 cp ./nls/en/{appsrv.ini,wfclient.ini,module.ini} ./config/
87 chmod 666 ./config/{appsrv.ini,wfclient.ini,module.ini}
90 # Go ahead and do the different operations pursiant with the architecture...
91 if [[ "${CARCH}" == "i686" ]]; then
92 # The installer works beautifully here, no reason to not just use that.
93 # I removed teh old script code that manually built the package, namely because
94 # it wasn't working and bothered the hell out of me, and then wrote a quick expect
95 # script to do the installation...
96 echo "#!/usr/bin/expect
97 spawn -noecho ./setupwfc
98 expect 'Enter option number 1-3'
100 expect 'abandon the installation:'
101 send '/usr/lib/ICAClient\r'
102 expect 'Proceed with installation?'
104 expect 'Enter option number 1-2'
106 expect 'Do you want to integrate Citrix Receiver with KDE and GNOME'
108 expect 'Do you want GStreamer to use the plugin from this client'
110 expect 'Do you want to install USB support?'
112 expect 'Enter option number 1-3'
114 exit 0" > citrix_install.sh
115 chmod 755 citrix_install.sh
116 cd "${pkgdir}${instdir}"/
117 # Remove the 64 bit plugins to prevent issues when stripping
118 find ${pkgdir} -iname "*64*" -exec rm {} \;
120 # We're 64 bit - Create executable wrapper for the binaries
121 echo -e "#!/bin/sh\nexport ICAROOT=${instdir}\nexport GCONV_PATH=/usr/lib32/gconv/\n\${ICAROOT}/wfica -file \"\$1\"" > ./wfica.sh
122 echo -e "#!/bin/sh\nexport ICAROOT=${instdir}\nexport GCONV_PATH=/usr/lib32/gconv/\n\${ICAROOT}/wfica -associate -fileparam \"\$1\"" > ./wfica_assoc.sh
123 cp ./wfica.sh "${pkgdir}"/usr/bin/wfica
124 cp ./wfica_assoc.sh "${pkgdir}"/usr/bin/wfica_assoc
125 chmod 755 ${pkgdir}/usr/bin/{wfica,wfica_assoc}
126 chmod 755 ./{wfica.sh,wfica_assoc.sh}