summaryrefslogtreecommitdiff
path: root/community/open-vm-tools/PKGBUILD
blob: 5d4bd2c8cd7a7670034e95d361db047be2bdf6d5 (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
# $Id: PKGBUILD 70830 2012-05-17 10:51:08Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Krzysztof Raczkowski <raczkow@gmail.com>

pkgname=open-vm-tools
pkgver=2012.03.13
_pkgsubver=651368
pkgrel=5
pkgdesc="The Open Virtual Machine Tools (open-vm-tools) are the open source implementation of VMware Tools"
arch=('i686' 'x86_64' 'mips64el')
url="http://open-vm-tools.sourceforge.net/"
license=('LGPL')
depends=('open-vm-tools-modules' 'libdnet' 'icu' 'procps-ng' 'uriparser' 'libsigc++' 'libxss')
makedepends=('chrpath' 'doxygen' 'gtkmm' 'fuse' 'libxtst')
optdepends=('gtkmm' 'libnotify' 'libxtst' 'fuse' 'libsm')
options=('docs' '!libtool')
install=$pkgname.install
source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver-${_pkgsubver}.tar.gz
	scripts-network.patch
	scripts-network-FS19541.patch
	open-vm-tools-X11Bool.patch
	open-vm-tools.conf.d
	open-vm-tools.rc.d
	tools.conf
	vmware-guestd
	xautostart.conf)
md5sums=('a664206443d5de53f5f8ee8d5fe6c2d7'
         'b8f68fef3d388489e40dba581b6da18a'
         '199508b0d3fe6fa9b726d09170bf51f1'
         '8c333a979578bdc0c3134c1dd6bb7353'
         '79b0a14d86191fee70a4639da8bd7785'
         '67cb83a9e5a4dd016c1a1da2863ca36d'
         'b55d15e2c4be396aad709aeca91033d3'
         '1b9ae908fce4c623269f100ee9bdfdef'
         '75a25d83417e683957321f97a00f8465')

build() {
  cd "$srcdir/$pkgname-${pkgver}-${_pkgsubver}"
  
  [ -f Makefile ] || CUSTOM_PROCPS_NAME="procps" ./configure --prefix=/usr --without-kernel-modules
  make
}

package() {
  cd "$srcdir/$pkgname-${pkgver}-${_pkgsubver}"

  make install DESTDIR="$pkgdir"
  install -Dm0644 vmware-user-suid-wrapper/vmware-user.desktop $pkgdir/usr/share/applications/vmware-user.desktop
  install -D -m 755 scripts/common/vmware-xdg-detect-de "$pkgdir"/usr/bin/vmware-xdg-detect-de
  chmod 07755 "$pkgdir"/usr/bin/vmware-user-suid-wrapper

  cd "$pkgdir"
  patch -p1 -i "$srcdir"/scripts-network.patch etc/vmware-tools/scripts/vmware/network
  patch -p1 -i "$srcdir"/scripts-network-FS19541.patch etc/vmware-tools/scripts/vmware/network

  install -Dm0755 "$srcdir"/open-vm-tools.rc.d "$pkgdir"/etc/rc.d/open-vm-tools
  install -Dm0644 "$srcdir"/open-vm-tools.conf.d "$pkgdir"/etc/conf.d/open-vm-tools
  install -Dm0644 "$srcdir"/tools.conf "$pkgdir"/etc/vmware-tools/tools.conf
  install -Dm0644 "$srcdir"/xautostart.conf "$pkgdir"/etc/vmware-tools/xautostart.conf
  install -Dm0644 "$srcdir"/vmware-guestd "$pkgdir"/etc/pam.d/vmware-guestd
  rm -rf "$pkgdir"/usr/etc

  ln -fs /usr/sbin/mount.vmhgfs "$pkgdir"/sbin/mount.vmhgfs

  cd "$pkgdir" && find -type f -exec sh -c "file {} | grep ELF >/dev/null && echo {} && chrpath -d {}" \;
}