# Template file for 'virtualbox-ose-guest'.
#
short_desc="${short_desc} - guest utilities"
long_desc="${long_desc}

 This package provides the guest utilities of the Open Source Edition of
 VirtualBox. These utilities are meant to be run inside the virtual machine.
 They provide closer integration and allow to share data through shared folders
 between the host system and the virtual machine."

Add_dependency run libgcc
Add_dependency run glibc
Add_dependency run libX11
Add_dependency run libXrandr
Add_dependency run libXt
Add_dependency run libXext
Add_dependency run libXmu
Add_dependency run libXcomposite
Add_dependency run libXdamage
Add_dependency run libXfixes
Add_dependency run pam
Add_dependency run MesaLib
Add_dependency run ${pkgname}-dkms ">=${version}"

do_install()
{
	install -d ${DESTDIR}/usr/{bin,lib} ${DESTDIR}/{etc,lib} \
		${DESTDIR}/lib/udev/rules.d ${DESTDIR}/usr/share/X11
	for f in VBoxClient* VBoxControl VBoxService; do
		mv ${SRCPKGDESTDIR}/usr/bin/${f} ${DESTDIR}/usr/bin
	done
	mv ${SRCPKGDESTDIR}/usr/share/X11 ${DESTDIR}/usr/share
	mv ${SRCPKGDESTDIR}/sbin ${DESTDIR}
	mv ${SRCPKGDESTDIR}/etc/xdg ${DESTDIR}/etc
	mv ${SRCPKGDESTDIR}/usr/lib/xorg ${DESTDIR}/usr/lib
	mv ${SRCPKGDESTDIR}/lib/udev/rules.d/70-xorg-vboxmouse.rules \
		${DESTDIR}/lib/udev/rules.d
	mv ${SRCPKGDESTDIR}/lib/security ${DESTDIR}/lib
	for f in VBoxOGL VBoxOGLarrayspu VBoxOGLcrutil VBoxOGLerrorspu \
		VBoxOGLfeedbackspu VBoxOGLpackspu VBoxOGLpassthroughspu; do
		mv ${SRCPKGDESTDIR}/usr/lib/${f}.so ${DESTDIR}/usr/lib
	done
}
