backport open-vm-tools recipe
[AGL/meta-agl.git] / meta-agl-bsp / recipes-support / open-vm-tools / open-vm-tools_10.1.5.bb
1 # This recipe is modified from the recipe originally found in the Open-Switch
2 # repository:
3 #
4 # https://github.com/open-switch/ops-build
5 # yocto/openswitch/meta-foss-openswitch/meta-oe/recipes-support/open-vm-tools/open-vm-tools_10.0.5.bb
6 # Commit 9008de2d8e100f3f868c66765742bca9fa98f3f9
7 #
8 # The recipe packaging has been relicensed under the MIT license for inclusion
9 # in meta-openembedded by agreement of the author (Diego Dompe).
10 #
11
12 SUMMARY = "Tools to enhance VMWare guest integration and performance"
13 HOMEPAGE = "https://github.com/vmware/open-vm-tools"
14 SECTION = "vmware-tools"
15
16 LICENSE = "LGPLv2.1 & GPLv2 & BSD & CDDLv1"
17 LIC_FILES_CHKSUM = "file://LICENSE;md5=b66ba4cb4fc017682c95efc300410e79"
18 LICENSE_modules/freebsd/vmblock = "BSD"
19 LICENSE_modules/freebsd/vmmemctl = "GPLv2"
20 LICENSE_modules/freebsd/vmxnet = "GPLv2"
21 LICENSE_modules/linux = "GPLv2"
22 LICENSE_modules/solaris = "CDDLv1"
23
24 SRC_URI = "git://github.com/vmware/open-vm-tools.git;protocol=https \
25            file://tools.conf \
26            file://vmtoolsd.service \
27            file://0001-configure.ac-don-t-use-dnet-config.patch \
28            file://0002-add-include-sys-sysmacros.h.patch \
29            "
30
31 SRCREV = "854c0bb374612f7e633b448ca273f970f154458b"
32
33 S = "${WORKDIR}/git/open-vm-tools"
34
35 DEPENDS = "glib-2.0 glib-2.0-native util-linux libdnet procps"
36
37 # open-vm-tools is supported only on x86.
38 COMPATIBLE_HOST = '(x86_64.*|i.86.*)-linux'
39
40 inherit autotools pkgconfig systemd
41
42 SYSTEMD_SERVICE_${PN} = "vmtoolsd.service"
43
44 EXTRA_OECONF = "--without-icu --disable-multimon --disable-docs \
45                 --disable-tests --without-gtkmm --without-xerces --without-pam \
46                 --disable-grabbitmqproxy --disable-vgauth --disable-deploypkg \
47                 --without-root-privileges --without-kernel-modules"
48
49 NO_X11_FLAGS = "--without-x --without-gtk2 --without-gtk3"
50 X11_DEPENDS = "libxext libxi libxrender libxrandr libxtst gtk+ gdk-pixbuf"
51 PACKAGECONFIG[x11] = ",${NO_X11_FLAGS},${X11_DEPENDS}"
52
53 # fuse gets implicitly detected; there is no --without-fuse option.
54 PACKAGECONFIG[fuse] = ",,fuse"
55
56 FILES_${PN} += "\
57     ${libdir}/open-vm-tools/plugins/vmsvc/lib*.so \
58     ${libdir}/open-vm-tools/plugins/common/lib*.so \
59     ${sysconfdir}/vmware-tools/tools.conf \
60     "
61 FILES_${PN}-locale += "${datadir}/open-vm-tools/messages"
62 FILES_${PN}-dev += "${libdir}/open-vm-tools/plugins/common/lib*.la"
63 FILES_${PN}-dbg += "\
64     ${libdir}/open-vm-tools/plugins/common/.debug \
65     ${libdir}/open-vm-tools/plugins/vmsvc/.debug \
66     "
67
68 CONFFILES_${PN} += "${sysconfdir}/vmware-tools/tools.conf"
69
70 RDEPENDS_${PN} = "util-linux libdnet fuse"
71
72 do_install_append() {
73     ln -sf ${sbindir}/mount.vmhgfs ${D}/sbin/mount.vmhgfs
74     install -d ${D}${systemd_unitdir}/system ${D}${sysconfdir}/vmware-tools
75     install -m 644 ${WORKDIR}/*.service ${D}${systemd_unitdir}/system
76     install -m 0644 ${WORKDIR}/tools.conf ${D}${sysconfdir}/vmware-tools/tools.conf
77 }
78
79 do_configure_prepend() {
80     export CUSTOM_PROCPS_NAME=procps
81     export CUSTOM_PROCPS_LIBS=-L${STAGING_LIBDIR}/libprocps.so
82     export CUSTOM_DNET_NAME=dnet
83     export CUSTOM_DNET_LIBS=-L${STAGING_LIBDIR}/libdnet.so
84 }