aboutsummaryrefslogtreecommitdiffstats
path: root/community/open-vm-tools/APKBUILD
blob: b6722c79a64a271484a451f580be1d4ea05b207c (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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=open-vm-tools
pkgver=10.3.10
_pkgsubver=${pkgver#*_p}
_ver=${pkgver/_p/-}
pkgrel=0
pkgdesc="The Open Virtual Machine Tools are the open source implementation of VMware Tools."
url="https://github.com/vmware/open-vm-tools/"
arch="x86 x86_64"
license="LGPL"
subpackages="$pkgname-dbg $pkgname-gtk $pkgname-dev $pkgname-openrc $pkgname-doc"
install="$pkgname.pre-install"
checkdepends="cunit checkbashisms"
makedepends="procps-dev libdnet-dev icu-dev glib-dev bash icu-dev
	gtk+3.0-dev libxext-dev libxinerama-dev libxtst-dev gtkmm3-dev fuse-dev
	libnotify-dev libxrandr-dev libxcomposite-dev libice-dev libsm-dev
	libtirpc-dev linux-headers libmspack-dev openssl-dev rpcgen
	automake autoconf libtool m4 doxygen xmlsec-dev
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/vmware/$pkgname/archive/stable-$_ver.tar.gz
	0001-lib-misc-Recognize-Alpine-Linux.patch
	0002-open-vm-tools-Add-disable-werror-configure-option.patch
	0003-Do-not-assume-that-linux-and-gnu-libc-are-the-same-t.patch
	0004-Use-configure-test-for-struct-timespec.patch
	0005-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch
	0006-Use-configure-to-test-for-feature-instead-of-platfor.patch
	0007-Use-configure-test-for-sys-stat.h-include.patch
	0008-Rename-poll.h-to-vm_poll.h.patch
	0009-gnu-ucontext.patch
	0010-use-posix-strerror_r-unless-gnu.patch
	0011-use-off64_t-instead-of-loff_t.patch
	0012-remove-references-to-missing-common-agent-etc-config.patch
	strerror_r.patch
	systemLinux.c-fixup-for-Alpine.patch

	$pkgname.initd
	$pkgname.confd
	$pkgname.logrotate
	"
builddir="$srcdir/$pkgname-stable-$_ver"

check() {
	export CUSTOM_PROCPS_NAME="procps"
	export CFLAGS="$CFLAGS -Wno-unused-but-set-variable -D_GNU_SOURCE"
	export CXXFLAGS="$CXXFLAGS -std=gnu++11 -fpermissive"

	cd "$builddir"/open-vm-tools
	make check

	checkbashisms scripts/linux/network
	checkbashisms scripts/common/statechange.sh
}

build() {
	export CUSTOM_PROCPS_NAME="procps"
	export CFLAGS="$CFLAGS -Wno-unused-but-set-variable -D_GNU_SOURCE"
	export CXXFLAGS="$CXXFLAGS -std=gnu++11 -fpermissive"

	cd "$builddir"/open-vm-tools

	autoreconf -vif || return 1
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--without-dnet \
		--without-xerces \
		--with-icu \
		--with-procps \
		--with-x \
		--without-kernel-modules \
		--without-pam \
		--enable-xmlsec1 \
		--disable-werror \
		--disable-glibc-check
	make
}

package() {
	cd "$builddir"/open-vm-tools

	make install DESTDIR="$pkgdir"

	cd "$pkgdir"

	chmod -x ./etc/vmware-tools/*.conf
	mv ./etc/vmware-tools/vm-support ./usr/bin/vm-support

	install -D -m 755 "$srcdir"/$pkgname.initd \
		./etc/init.d/$pkgname
	install -D -m 644 "$srcdir"/$pkgname.confd \
		./etc/conf.d/$pkgname

	install -D -m 644 "$srcdir"/$pkgname.logrotate \
		./etc/logrotate.d/$pkgname

	mkdir -p ./etc/modules-load.d/
	cat > ./etc/modules-load.d/"$pkgname".conf <<-EOF
		vmblock
		vmci
		vmhgfs
		vmsync
		vmxnet
		vsock
		vmw_balloon
	EOF
}

gtk() {
	pkgdesc="Xorg apps and plugins for open-vm-tools"

	mkdir -p "$subpkgdir"/usr/bin \
		"$subpkgdir"/usr/lib/open-vm-tools/plugins/vmsvc \
		"$subpkgdir"/etc/

	mv "$pkgdir"/usr/bin/vmware-user-suid-wrapper \
		"$pkgdir"/usr/bin/vmware-vmblock-fuse \
		"$pkgdir"/usr/bin/vmware-user \
		"$subpkgdir"/usr/bin/
	mv "$pkgdir"/etc/xdg "$subpkgdir"/etc/
	mv "$pkgdir"/usr/lib/open-vm-tools/plugins/vmusr \
		"$subpkgdir"/usr/lib/open-vm-tools/plugins/
	mv "$pkgdir"/usr/lib/open-vm-tools/plugins/vmsvc/libresolutionKMS.so \
		"$subpkgdir"/usr/lib/open-vm-tools/plugins/vmsvc/
}

sha512sums="0e3125be5514a006dd4303057201c5922e4e3654ec1ef12d1effb94716ac4d45495cc110724c8d8e16855437dab6b596bc79c69a8789fb3eb20576f99b8d76cf  open-vm-tools-10.3.10.tar.gz
5aa0d21bd4e1e7e4791677e02d0a50ad1800c1a5507044c9d693c59cc2360c423eba25643fba615f597b6dafad0e9551b775cf144b63051b68c934e911b5caed  0001-lib-misc-Recognize-Alpine-Linux.patch
9188161f9bbd6572ee20855e727257b2140b39f1ba19b96879eb9878fb08cbdb7c3a5c9f5f8a4f389090acea6f71ee88fb36c7d4a74c1b8b94c9124db696a7f2  0002-open-vm-tools-Add-disable-werror-configure-option.patch
1dd0cde6ee19aec77ddf803e95b0404e803569a38c7b3d001832b4bbeae95ea15ed32c59f27bffb315130bad0c7a788a7a522df13a5f265f66c4c7c302a1966d  0003-Do-not-assume-that-linux-and-gnu-libc-are-the-same-t.patch
c647561c72b3ad919502ec4dd0a1ab736e2d479d8437b882791adce5417d8c26163ecffe9e212dab633c513bce6447cdbcb610eecf7dbb0eeeb792db16301de5  0004-Use-configure-test-for-struct-timespec.patch
6b0b9cc4a7b9837649a01aacb957b4465ec901250e48dbb273514abedf8eb3a9c16b3ad09be413a8ab897e37dff0d065a3144a2418cd7ae5aa3020bd1ed14203  0005-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch
58f68cef6c6388a3f1b66758af81c2818abb43222c140ce95419c94bb9aaf42102275844c18b9743c758f1984e8de6c92801348593e1a3e47f813316c4cc866b  0006-Use-configure-to-test-for-feature-instead-of-platfor.patch
9d28eab3e1a40138efa05e78956a2615b171703f9689252d0960145e39b0ba5bbf0e2007479cbbca3dced89ccb45758908a57a2f5b361e4813ad67a0732e4539  0007-Use-configure-test-for-sys-stat.h-include.patch
ff807233d0d1b15897d012080851007d23ad6e19c76eb85c9f63673491a4ff622a7d69d99c4a23ffe0fb4a24e57faf9cd1b1c2cce055a532d940dd3462168990  0008-Rename-poll.h-to-vm_poll.h.patch
88a8dcb785723c6120aed19e46c7f9890858a4b60db4a86e97fe4babf7b0d8babb3b3294f9d6c0004c6ae0c75860c3a624e6446f6e0d1a23bb92578f92120352  0009-gnu-ucontext.patch
6c8b99f51bc0fd114ce66a3311f151efbe56ec308d079afec837b9d0b60eae3fb42e1b5219246c1015a23fb63616398b958e1388830b80d5efdb27cce7bd6552  0010-use-posix-strerror_r-unless-gnu.patch
a38bb2ac16657be9f7e9b2a5e32d23e66db1f283284c1cb8e7ffe853e047373397e60f01e735a28ecfaa60010f285b0b5a4066465a2afbe643a9b4b9b74ac1f4  0011-use-off64_t-instead-of-loff_t.patch
ae00f77279a76f0d5205e7c6e8e2a9abd8fd1590244a907792c9be003c38c057eee015aba3e79bd956b4197dc03b7a6eb3935620f3d3cbc4d4e7c62187ae76ce  0012-remove-references-to-missing-common-agent-etc-config.patch
5507a58198179805e4c924b6bd6ac8b026bd602c9e5e4c52213dadf6c8880a23a16ee49a4dfe2db27515c2a36009e609dd81b7ee0d560bbea1ddf6a5324eb7ac  strerror_r.patch
c18280eb3fdfe1e3ecc5aa116369908c71917bd4dd49743a9abf78e0096e8d6c7d4323057cf506ef31886b893b2e4c4839656172edd5097a347efa96aea1c86c  systemLinux.c-fixup-for-Alpine.patch
d4d0c0c3042eef4d241c933de6f7c398a88275744b3576efc2f909acd681752f548e4ae4a17eca7db731ee0b9254b46169a48463d12a72ec6354065d788159f4  open-vm-tools.initd
ffc9c945a41e48791bab61ba72fed96c1a6ae3722caa715424e3077d167421b4e2f53bb4d415ab227d1f6e40d6ca3779df41e6b0a38db34b520979fa2b19298d  open-vm-tools.confd
5626c68b8ee01ece804f314b829476280e892581a448c27092e32a60b04d40ecfa8e8eca464c4376c3cfc497eb60406798b7383d1a747a173d3cd8b78d23100b  open-vm-tools.logrotate"