# Tanım: VMWare Araçları
# URL: http://open-vm-tools.sf.net/
# Paketçi: milisarge
# Gerekler: chrpath libdnet glib libmspack cunit xorg-libx11 xorg-libxext xorg-libxinerama xorg-libxi xorg-libxrender xorg-libxrandr xorg-libxtst gdk-pixbuf gtk3 gtkmm3
# Grup: sistem

isim=open-vm-tools
surum=10.2.0
devir=1
kaynak=(https://github.com/vmware/open-vm-tools/archive/stable-${surum/_/-}.tar.gz::open-vm-tools-$surum.tar.gz
		0001-Set-X11-as-the-backend-for-gtk3-of-open-vm-tools.patch)

derle(){
	cd "$SRC/$isim-"*"/open-vm-tools"
	patch -Np2 < "${SRC}"/0001-Set-X11-as-the-backend-for-gtk3-of-open-vm-tools.patch
	cd "$SRC/$isim-"*"/open-vm-tools"
	autoreconf -vi
	sh ./configure --prefix=/usr \
	--sbindir=/usr/bin \
	--sysconfdir=/etc \
	--with-udev-rules-dir=/usr/lib/udev/rules.d \
	--without-xmlsecurity \
	--without-kernel-modules
	make
	cd "$SRC/$isim-"*"/open-vm-tools"
	make install DESTDIR="$PKG"
	chmod 7755 "$PKG"/usr/bin/vmware-user-suid-wrapper
	# install vmware-xdg-detect-de
	install -D -m 0755 scripts/common/vmware-xdg-detect-de "$PKG"/usr/bin/vmware-xdg-detect-de
	# We don't want a symlink in /sbin
	rm "$PKG"/sbin/mount.vmhgfs
	rmdir "$PKG"/sbin
}