summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d4f380c975c41be4c5cc9faf308db6f6b0c54d1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Maintainer: Paul Wilk <paul.wilk@null.net>
# Contributor: ReNoM <renom@list.ru>

# If you need the bundle, google VMware-ClientIntegrationPlugin-6.2.0.x86_64.bundle
#
# PS - This is suck a hack

pkgname=vmware-vsphere-web-client-plugin
pkgver=6.2.0
pkgrel=4
pkgdesc="Firefox and Chromium plugin, to access virtual machines console from vSphere Web Client."
arch=('x86_64')
url="http://www.vmware.com/"
license=('custom:vmware')
depends=(mozilla-common)
optdepends=(
'pipelight: for Mozilla Firefox Wine based Flash Player support'
'freshplayerplugin-git: for Mozilla Firefox PPAPI based Flash Player support'
'flash'
)
majverf=6.2.0
majver=60
majverdot=6.0
minvmrcver=3698060
vmrcver=5.5
vmrcverdot=5.5.1
bundle_arch=x86_64 
larch=64
source=("http://vsphereclient.vmware.com/vsphereclient/4/2/7/4/6/6/6/VMware-ClientIntegrationPlugin-6.2.0.x86_64.bundle")

[ "$CARCH" == "x86_64" ] && sha256sums=('6f09173699c2e4ba30d101df55e8cfb89b9f73fff4e942b25fe5801f4778ed93')

build() {
  cd "$srcdir"
  export GTK_PATH=/usr/lib/gtk-2.0; sh ../VMware-ClientIntegrationPlugin-${majverf}.${bundle_arch}.bundle -x files

  ##### Ported from files/vmware-installer/.installer/2.1.0/vmware-installer.py around line 186
  ### Thanks vmware for not updating vmrc to 6.0
  SRC="$srcdir/files/vmware-vmrc-${vmrcver}"
  DEST="/usr/lib/vmware-vmrc/${vmrcver}"
  libconf=$DEST/'libconf'
  replace=('etc/pango/pangorc' 'etc/pango/pango.modules' 'etc/pango/pangox.aliases'
                 'etc/gtk-2.0/gdk-pixbuf.loaders' 'etc/gtk-2.0/gtk.immodules')
  templates=('@@LIBCONF_DIR@@')

  for i in "${replace[@]}"; do
    i="$SRC/libconf/$i"
    for template in "${templates[@]}"; do
       sed -e s,"$template","$libconf",g -i "$i"
    done
  done
}

package ()
{
        cd "$pkgdir"
        mkdir -p usr/lib/vmware-cip/${majverdot}/
        mkdir -p usr/lib/vmware-vmrc/${vmrcver}/
        mkdir -p usr/lib/mozilla/plugins
        mkdir -p etc/vmware-vmrc/${vmrcver}
        echo "libdir = \"/usr/lib/vmware-vmrc/${vmrcver}\"" > etc/vmware-vmrc/${vmrcver}/config
        # install cip
        install ${srcdir}/files/vmware-cip-60/npVMwareClientSupportPlugin-6-0-0.so "usr/lib/vmware-cip/${majverdot}/"
        mv "$srcdir/files/vmware-cip-${majver}/artwork" "usr/lib/vmware-cip/${majverdot}/"
        mv "$srcdir/files/vmware-cip-${majver}/ovftool" "usr/lib/vmware-cip/${majverdot}/"
        chmod +x "usr/lib/vmware-cip/${majverdot}/ovftool/ovftool"
        chmod +x "usr/lib/vmware-cip/${majverdot}/ovftool/ovftool.bin"
        ln -s "/usr/lib/vmware-cip/${majverdot}/npVMwareClientSupportPlugin-6-0-0.so" "usr/lib/mozilla/plugins/npVMwareClientSupportPlugin-6-0-0.so"
        # install vmrc
        install "$srcdir/files/vmware-vmrc-${vmrcver}/np-vmware-vmrc-${vmrcverdot}-${minvmrcver}-32.so" "usr/lib/vmware-vmrc/${vmrcver}/"
        install "$srcdir/files/vmware-vmrc-${vmrcver}/np-vmware-vmrc-${vmrcverdot}-${minvmrcver}-64.so" "usr/lib/vmware-vmrc/${vmrcver}/"
        install "$srcdir/files/vmware-vmrc-${vmrcver}/np-vmware-vmrc.so" "usr/lib/vmware-vmrc/${vmrcver}/"
        install "$srcdir/files/vmware-vmrc-${vmrcver}/open_source_licenses.txt" "usr/lib/vmware-vmrc/${vmrcver}/"
        install "$srcdir/files/vmware-vmrc-${vmrcver}/version.txt" "usr/lib/vmware-vmrc/${vmrcver}/"
        install "$srcdir/files/vmware-vmrc-${vmrcver}/vmware-desktop-entry-creator" "usr/lib/vmware-vmrc/${vmrcver}/"
        mv "$srcdir/files/vmware-vmrc-${vmrcver}/bin" "usr/lib/vmware-vmrc/${vmrcver}/"
        chmod -R +x "usr/lib/vmware-vmrc/${vmrcver}/bin/"
        mv "$srcdir/files/vmware-vmrc-${vmrcver}/lib" "usr/lib/vmware-vmrc/${vmrcver}/"
        mv "$srcdir/files/vmware-vmrc-${vmrcver}/libconf" "usr/lib/vmware-vmrc/${vmrcver}/"
        mv "$srcdir/files/vmware-vmrc-${vmrcver}/share" "usr/lib/vmware-vmrc/${vmrcver}/"
        mv "$srcdir/files/vmware-vmrc-${vmrcver}/xkeymap" "usr/lib/vmware-vmrc/${vmrcver}/"
        ln -s /usr/lib/vmware-vmrc/${vmrcver}/np-vmware-vmrc-${vmrcver}-${larch}.so usr/lib/mozilla/plugins/np-vmware-vmrc-${vmrcver}-${larch}.so
        ln -s /usr/lib/vmware-vmrc/${vmrcver}/bin/appLoader usr/lib/vmware-vmrc/${vmrcver}/bin/vmware-deviceMgr
        ln -s /usr/lib/vmware-vmrc//bin/appLoader usr/lib/vmware-vmrc/${vmrcver}/bin/vmware-vmrc
        ln -s /usr/lib/vmware-vmrc/${vmrcver}/bin/appLoader usr/lib/vmware-vmrc/${vmrcver}/bin/vmware-vmrc-daemon
        ln -s /usr/lib/vmware-vmrc/${vmrcver}/bin/vmware-deviceMgr usr/lib/vmware-vmrc/${vmrcver}/vmware-deviceMgr
        ln -s /usr/lib/vmware-vmrc/${vmrcver}/bin/vmware-vmrc usr/lib/vmware-vmrc/${vmrcver}/vmware-vmrc
        ln -s /usr/lib/vmware-vmrc/${vmrcver}/bin/vmware-vmrc-daemon usr/lib/vmware-vmrc/${vmrcver}/vmware-vmrc-daemon
}
sha256sums=('548e54f2caa085906125eab6908a1900dd6f96dad6674f0a8a37d6b0f405005b')