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=(linuxx86-$pkgver.tar::'http://www.citrix.com/English/SS/downloads/EULA_p.asp?downloadID=2316611&versionID=2316622&productID=1689163')
12 arch=('i686' 'x86_64')
14 md5sums=('d99029de72f8bb6ada8297d16f39ad90')
35 instdir="/usr/lib/ICAClient"
61 instdir="/usr/lib32/ICAClient"
65 install=citrix-client.install
68 # Create folder structure
69 mkdir -p "${pkgdir}${instdir}"
70 mkdir -p "${pkgdir}/usr/lib/mozilla/plugins"
71 mkdir -p "${pkgdir}/usr/bin/"
74 cp -r ./linuxx86/linuxx86.cor/* "${pkgdir}${instdir}"/
75 cp ./setupwfc "${pkgdir}${instdir}"/
77 # Go to package directory
78 cd "${pkgdir}${instdir}"/
80 # Create symlinks for the Npica.ad binary
81 ln -s ./nls/en/Npica.ad ./Npica.ad
82 ln -s ./Npica.ad ./Npica
84 # Copy EULA to program root directory
85 cp ${srcdir}/linuxx86/linuxx86.cor/nls/en/eula.txt ./
87 # Copy default configuration files to config directory of the program and setting them readable
88 cp ./nls/en/{appsrv.ini,wfclient.ini,module.ini} ./config/
89 chmod 666 ./config/{appsrv.ini,wfclient.ini,module.ini}
92 # Go ahead and do the different operations pursiant with the architecture...
93 if [[ "${CARCH}" == "i686" ]]; then
94 # Create the 32 bit client script
95 echo -e "#!/bin/sh\n${instdir}/wfcmgr" > "${pkgdir}"/usr/bin/citrix-client.sh
96 chmod a+x "${pkgdir}"/usr/bin/citrix-client.sh
97 # Create executable wrapper for the binaries
98 echo -e "#!/bin/sh\nexport ICAROOT=${instdir}\n\${ICAROOT}/wfica -file \$1" > ./wfica.sh
99 echo -e "#!/bin/sh\nexport ICAROOT=${instdir}\n\${ICAROOT}\n\${ICAROOT}/wfica -associate -fileparam \$1" > ./wfica_assoc.sh
100 cp ./wfica.sh "${pkgdir}"/usr/bin/wfica
101 cp ./wfica_assoc.sh "${pkgdir}"/usr/bin/wfica_assoc
102 chmod 755 ${pkgdir}/usr/bin/{wfica,wfica_assoc}
103 chmod 755 ./{wfica.sh,wfica_assoc.sh}
104 # Copy Firefox plugin into plugin directory
105 cp ./npica.so "${pkgdir}"/usr/lib/mozilla/plugins/
107 # We're 64 bit - Create executable wrapper for the binaries
108 echo -e "#!/bin/sh\nexport ICAROOT=${instdir}\nexport GCONV_PATH=/usr/lib32/gconv/\n\${ICAROOT}/wfica -file \"\$1\"" > ./wfica.sh
109 echo -e "#!/bin/sh\nexport ICAROOT=${instdir}\nexport GCONV_PATH=/usr/lib32/gconv/\n\${ICAROOT}/wfica -associate -fileparam \"\$1\"" > ./wfica_assoc.sh
110 chmod a+x ./{wfica.sh,wfica_assoc.sh}