summaryrefslogtreecommitdiffstats
path: root/testing/open-vm-tools/APKBUILD
blob: c58775862da516759723fafe48a30d76de72e540 (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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=open-vm-tools
pkgver=8.4.2
_pkgsubver=261024
pkgrel=1
pkgdesc="The Open Virtual Machine Tools are the open source implementation of VMware Tools."
url="http://open-vm-tools.sourceforge.net/"
license="LGPL"
subpackages="$pkgname-gtk"
makedepends="procps-dev libdnet-dev icu-dev glib-dev pkgconfig bash
	libtirpc-dev rpcgen icu-dev automake autoconf
	gtk+-dev libxext-dev libxinerama-dev libxtst-dev gtkmm-dev
	libnotify-dev libxrandr-dev
	"
source="http://downloads.sourceforge.net/open-vm-tools/open-vm-tools-$pkgver-$_pkgsubver.tar.gz
	getloadavg-uclibc.patch
	codeset-uclibc.patch
	ecvt.patch
	iconv-uclibc.patch
	libm.patch
	checkvm-pie-safety.patch
	resume-vm-default.patch
	suspend-vm-default.patch
	open-vm-tools.initd
	open-vm.initd
	open-vm.confd
	"

_builddir="$srcdir"/$pkgname-$pkgver-$_pkgsubver

prepare() {
	cd "$_builddir"
	for i in "$srcdir"/*.patch; do
		[ -r "$i" ] || continue
		patch -p1 -i "$i" || return 1
	done

	sed -i -e 's/__unused1/st_atim.tv_nsec/g' \
		-e 's/__unused2/st_mtim.tv_nsec/g' \
		-e 's/__unused3/st_ctim.tv_nsec/g' \
		lib/file/filePosix.c lib/hgfsServer/hgfsServerLinux.c \
		|| return 1
	
	# workaround automake-1.10 issue
	# http://ramblingfoo.blogspot.com/2007/07/required-file-configrpath-not-found.html
	touch config/config.rpath
	aclocal -I m4 && autoconf && automake
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--disable-unity \
		--with-dnet \
		--with-icu \
		--with-procps \
		--with-x \
		--without-kernel-modules \
		--without-pam \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make install DESTDIR=$pkgdir || return 1

	# one of the plugins seems to be linked to libhgfsServer
	# create a link to abuild gets happy
	ln -s open-vm-tools/plugins/vmsvc/libhgfsServer.so \
		"$pkgdir"/usr/lib/libhgfsServer.so.0
	
	# dont bother create a -dev package
	rm -f "$pkgdir"/usr/lib/*.a "$pkgdir"/usr/lib/*.la

	install -Dm644 "$srcdir"/open-vm-tools.desktop \
		"$pkgdir"/etc/xdg/open-vm-tools.desktop
	install -Dm755 "$srcdir"/open-vm-tools.initd \
		"$pkgdir"/etc/init.d/open-vm-tools
	install -Dm644 "$srcdir"/open-vm.confd "$pkgdir"/etc/conf.d/open-vm
	install -Dm755 "$srcdir"/open-vm.initd "$pkgdir"/etc/init.d/open-vm
}

gtk() {
	pkgdesc="Xorg apps and plugins for open-vm-tools"
	mkdir -p "$subpkgdir"/usr/bin \
		"$subpkgdir"/usr/lib/open-vm-tools/plugins/vmusr \
		"$subpkgdir"/etc/
	mv "$pkgdir"/usr/bin/vmware-toolbox \
		"$pkgdir"/usr/bin/vmware-user \
		"$subpkgdir"/usr/bin/
	mv "$pkgdir"/usr/lib/open-vm-tools/plugins/vmusr/libresolutionSet.so \
		"$pkgdir"/usr/lib/open-vm-tools/plugins/vmusr/libvixUser.so \
		"$subpkgdir"/usr/lib/open-vm-tools/plugins/vmusr/
	mv "$pkgdir"/etc/xdg "$subpkgdir"/etc/
}

md5sums="4d9ddc865b42fc6982c3078031500486  open-vm-tools-8.4.2-261024.tar.gz
bf2398b976d849bfd29a02763984a68a  getloadavg-uclibc.patch
82840b6bed002284b9bd2358707ee826  codeset-uclibc.patch
840e4d6ff3f53fc22bdedf4d64aabc91  ecvt.patch
454827c50f5b1290dd647717e87d0f5a  iconv-uclibc.patch
7d02fc25aba5c248f3d98dac238f175b  libm.patch
7ba4dea8fc5c285e4837f9e33d835083  checkvm-pie-safety.patch
2606c0d5b180a77634ad26343d68852d  resume-vm-default.patch
c6d7a6640bb26c22e632aea21b04227b  suspend-vm-default.patch
c79ca03660fa75d00028325f53a37b4e  open-vm-tools.initd
b56e3e6ebde04054b27e23e7c6d0d22c  open-vm.initd
2570d31a242f40eae8f8f2517536dd5f  open-vm.confd"