updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / citrix-client / PKGBUILD
blob0bbf956382e1449f5ded9c16f41c8d39702293bb
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"
6 pkgver="12.0"
7 pkgrel="0"
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')
13 license=('CAL')
14 md5sums=('d99029de72f8bb6ada8297d16f39ad90')
16 case ${CARCH} in
17     i686 )
18         depends=(
19             'gtk2'
20             'libx11'
21             'libxaw'
22             'libxext'
23             'libxft'
24             'libxmu'
25             'libxp'
26             'libxpm'
27             'libxt'
28             'libcanberra'
29             'openmotif'
30             'printproto'
31             'xextproto'
32             'alsa-lib'
33             'glib2'
34         )
35         instdir="/usr/lib/ICAClient"
36         ;;
37     x86_64 )
38         depends=(
39             'gtk2'
40             'libcanberra'
41             'lib32-gcc-libs'
42             'lib32-libjpeg'
43             'lib32-libpng'
44             'lib32-libvorbis'
45             'lib32-libx11'
46             'lib32-libxaw'
47             'lib32-libxext'
48             'lib32-libxft'
49             'lib32-libxinerama'
50             'lib32-libxmu'
51             'lib32-libxp'
52             'lib32-libxpm'
53             'lib32-libxt'
54             'lib32-openmotif'
55             'printproto'
56             'xextproto'
57             'lib32-alsa-lib'
58             'lib32-glib2'
59             'lib32-gtk2'
60         )
61         instdir="/usr/lib32/ICAClient"
62         ;;
63 esac
65 install=citrix-client.install
67 build() {
68     # Create folder structure
69     mkdir -p "${pkgdir}${instdir}"
70     mkdir -p "${pkgdir}/usr/lib/mozilla/plugins"
71     mkdir -p "${pkgdir}/usr/bin/"
73     # copy needed files
74     cp -r ./linuxx86/linuxx86.cor/* "${pkgdir}${instdir}"/
75     cp ./setupwfc "${pkgdir}${instdir}"/
77     # Go to package directory
78     cd "${pkgdir}${instdir}"/
79     
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}
90     chmod 777 ./config
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/
106     else
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}
111     fi