aboutsummaryrefslogtreecommitdiffstats
path: root/main/open-vm-tools/APKBUILD
blob: f59e4c994f5072043ab791219eb1cd42e4257f9d (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=open-vm-tools
pkgver=9.4.6_p1770165
_pkgsubver=${pkgver#*_p}
_ver=${pkgver/_p/-}
pkgrel=2
pkgdesc="The Open Virtual Machine Tools are the open source implementation of VMware Tools."
url="http://open-vm-tools.sourceforge.net/"
arch="x86 x86_64"
license="LGPL"
subpackages="$pkgname-gtk $pkgname-dev"
install="$pkgname.pre-install"
makedepends="procps-dev libdnet-dev icu-dev glib-dev bash icu-dev
	gtk+-dev libxext-dev libxinerama-dev libxtst-dev gtkmm-dev fuse-dev
	libnotify-dev libxrandr-dev libxcomposite-dev libice-dev libsm-dev
	libtirpc-dev
	automake autoconf libtool m4
	"
source="http://downloads.sourceforge.net/project/open-vm-tools/open-vm-tools/stable-${pkgver%.*}.x/open-vm-tools-$_ver.tar.gz
	0001-lib-misc-Recognize-Alpine-Linux.patch
	werror.patch
	tirpc.patch
	linux-is-not-gnu.patch
	fts.patch
	struct_timespec.patch
	posix-perms.patch
	setresuid.patch
	musl-regs.patch
	sys-stat.patch
	open-vm-tools.initd
	"

[ "$ALPINE_LIBC" != "eglibc" ] && makedepends="$makedepends rpcgen"

_builddir="$srcdir"/$pkgname-$_ver

prepare() {
	cd "$_builddir"

        for patch in $source; do
                case $patch in
                *.patch)
                        msg "Applying patch $patch"
                        patch -p1 -i "$srcdir"/$patch || return 1
                        ;;
                esac
        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-
	mkdir -p config
	touch config/config.rpath
	libtoolize --force --install && aclocal -I m4 -I config && autoconf \
		&& automake --add-missing
}

build() {
	export CUSTOM_PROCPS_NAME="procps"
	export CFLAGS="$CFLAGS -Wno-unused-but-set-variable -D_GNU_SOURCE"
	mkdir "$srcdir"/build
	cd "$srcdir"/build
	../$pkgname-$_ver/configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--without-dnet \
		--with-icu \
		--with-procps \
		--with-x \
		--without-kernel-modules \
		--without-pam \
		|| return 1
	make || return 1
}

package() {
	cd "$srcdir"/build
	make install DESTDIR=$pkgdir || return 1
	install -Dm755 "$srcdir"/open-vm-tools.initd \
		"$pkgdir"/etc/init.d/open-vm-tools
	find "$pkgdir" -name '*.la' -delete
}

gtk() {
	pkgdesc="Xorg apps and plugins for open-vm-tools"
	mkdir -p "$subpkgdir"/usr/bin \
		"$subpkgdir"/usr/lib/open-vm-tools/plugins \
		"$subpkgdir"/etc/
	mv "$pkgdir"/usr/bin/vmware-user-suid-wrapper \
		"$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/
}

md5sums="3969daf1535d34e1c5f0c87a779b7642  open-vm-tools-9.4.6-1770165.tar.gz
87b131c2208b32d9c0bb6fbacd7f75a9  0001-lib-misc-Recognize-Alpine-Linux.patch
e462f567cd5588d738af4cfa0dd13b3c  werror.patch
c89d3f4db3b86bf60359b2c32fc5a22a  tirpc.patch
50a8a12058d4b124b5a7e229993dc365  linux-is-not-gnu.patch
012907c27e4f5fece18a1e8c21f23776  fts.patch
821d75876bbb3b55703ec72e02d30cc6  struct_timespec.patch
2ef8fdedff4998f38c373513cd57fae5  posix-perms.patch
ad5a1b69aa80d5dfc23f640ac2e33004  setresuid.patch
8ecff63e2488e3549b1b6d31e476fe8a  musl-regs.patch
22358020ff9d2d917adfc97ad82e176a  sys-stat.patch
905ef6a3bac87c9ba2e5d3897ca230e7  open-vm-tools.initd"
sha256sums="54d7a83d8115124e4b809098b08d7017ba50828801c2f105cdadbc85a064a079  open-vm-tools-9.4.6-1770165.tar.gz
7c12e96fed05834857ff6971d297ac8560eef2942817a37303909b76dff54da0  0001-lib-misc-Recognize-Alpine-Linux.patch
b3d39192908c43a26c8aff92d99510b8195c2c7a4e990ff3e74b73ef5bccd73c  werror.patch
1bb6d48d46ea4877e5b2c54eb094f5cf6c3b2fc09db77c01f8fc3626fa13bd6c  tirpc.patch
3caeb8011cc1fa0554b5d96115827a71b273b2031662b2e08376e02633448931  linux-is-not-gnu.patch
517bef979ea411a0182d18266c2fe1420d1b1940e58e64435af2941f0e44aa45  fts.patch
87ebc8821291ca7046ec4285c4814cee7ea92bed8c71c9b4c56cbbf19dcb9f9e  struct_timespec.patch
9735e3251e33bb1349af35aa23853a39f660340ca5154488e4dd3594b8b8b53a  posix-perms.patch
8fc78b0d8ca42963be7530bd76d74dd851eea2e0f59661f08810147648702069  setresuid.patch
13920ca0fbc49646f9294dee6abd3decf072f98b238c8a680e0b98b3f3559c82  musl-regs.patch
6f738a4a45ee506337a89cfcda05eaeffa38c1f1695d8ee45bf78a00fa1134de  sys-stat.patch
7a2ef75375f524042286202b6e03174e60226d4318b4d9145d1fe71517c1af76  open-vm-tools.initd"
sha512sums="a16dc51a51a182031c1849776be9ac0e13bef9d9cb85807e03fbb816d4e9109b64e60f1919f6686a471c79042f30ca93f0193985c2150c6254bc72e3fd8ffa49  open-vm-tools-9.4.6-1770165.tar.gz
c9f99658dcbd659ed7288dae36d47216aeea8a496f7fab52711bffb382fab8035c9414045a1dffae79eb38ff03fcb116e1965dae00532f92a09173695f1756aa  0001-lib-misc-Recognize-Alpine-Linux.patch
2128c4056e110a068a98cbc9c3ef934aa99d2a74ccae6b96aae6776d62595ac1cb544bbc299002bf545827dee0c75a02a227ea5d43838eeae720e70ee7959824  werror.patch
98da1733eba6f53a53a9361ee2ad02dbd08fa8958aba449cebbf5be04705af1bc0fab187f2d78b94f2802a3c0b32fa03d33249006236ce27c10702992a62abb4  tirpc.patch
fa9407febe8ed3bff114eddb66a12e7bfed995a1d8818a7b2fd6c619b6b1f42836326c81a799d6e40250aa5d391b340d7af5aad092409e489e8fdba729e9f132  linux-is-not-gnu.patch
75d9a72204dbef4e34b8e66c39210a07243abe8663dcf8a194763a15587195e88b47d5882264dd6a8fe0a82c6f94cfb0fa4b02156fca28609ed09a0dd8320bed  fts.patch
7fc08ad7018b6790bb7125621b7e387bfb4219325550ef28a88ddd0b473136afe5da11a8f6066c3ebba6cc645e2f7a16a019cbfca0f31f3164fe505d76517c85  struct_timespec.patch
ee5e6b49cb3878b37887d95bbaa687536e2339c9ec48a315351ca690f966a800afdc3a7e3026127f59eb8b0549057e9ec299daf3991166bdd66795f79f5ca485  posix-perms.patch
4cec764234742ea7fa8c61867ae1e396d1fed3d4f881fee063b19ab51ba30b4831d33d8d96a92a03944e7d044c7736d60aa4de06ab5cc8c484fed5cde5c57592  setresuid.patch
16449ee7b30161d4486385947763b34e02a22429c794333ec641f328b988209fd128f48d9d6c8c41c4e6bb8349df0680cb968ab1212b9cba8bc43d4c36704316  musl-regs.patch
94d8ce4415b8adce214acc13677e4c93f746923915f9017416f33d05e1c1ea0fad399926d9b5cec3385c97f79266c89a3b4a401d14518b0344398ec77cb44f48  sys-stat.patch
bd0210b74154030bafdf9911d2303e49e1c68afa681e4276577074ac3060b52e8e5f14055b1b088398ce1ef0aee3d63f8d358d9e045a15099391f3713edb922a  open-vm-tools.initd"