Merge pull request #19372 from cotequeiroz/libgd
[feed/packages.git] / utils / open-vm-tools / Makefile
1 #
2 # Copyright (C) 2018 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=open-vm-tools
11 PKG_VERSION:=12.0.0
12 PKG_RELEASE:=$(AUTORELEASE)
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-19345655.tar.gz
15 PKG_SOURCE_URL:=https://github.com/vmware/open-vm-tools/releases/download/stable-$(PKG_VERSION)
16 PKG_HASH:=ea370217a213802f91b01231e28298bbe54134822351fb5cc70255d80ba0e775
17 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-19345655
18
19 PKG_LICENSE:=LGPL-2.1-or-later
20 PKG_LICENSE_FILES:=LICENSE
21
22 PKG_FIXUP:=autoreconf
23 PKG_INSTALL:=1
24 PKG_BUILD_PARALLEL:=1
25 PKG_BUILD_DEPENDS:=glib2/host
26
27 include $(INCLUDE_DIR)/package.mk
28 include $(INCLUDE_DIR)/nls.mk
29
30 define Package/open-vm-tools/Default
31 SECTION:=utils
32 CATEGORY:=Utilities
33 URL:=https://github.com/vmware/open-vm-tools
34 endef
35
36 define Package/open-vm-tools
37 $(call Package/open-vm-tools/Default)
38 DEPENDS:=@TARGET_x86 \
39 +glib2 \
40 +libpthread \
41 +libtirpc \
42 +libmspack \
43 +libdnet
44 TITLE:=open-vm-tools
45 URL:=https://github.com/vmware/open-vm-tools
46 MAINTAINER:=Yuhei OKAWA <tochiro.srchack@gmail.com>
47 endef
48
49 define Package/open-vm-tools/description
50 Open Virtual Machine Tools for VMware guest OS
51 endef
52
53 define Package/open-vm-tools-fuse
54 $(call Package/open-vm-tools/Default)
55 DEPENDS:=+open-vm-tools +libfuse3
56 TITLE:=open-vm-tools-fuse
57 MAINTAINER:=Kagurazaka Kotori <kagurazakakotori@gmail.com>
58 endef
59
60 define Package/open-vm-tools-fuse/description
61 Shared Folders user mode FUSE client support for VMware guest OS
62 endef
63
64 CONFIGURE_ARGS+= \
65 --without-icu \
66 --disable-containerinfo \
67 --disable-multimon \
68 --disable-docs \
69 --disable-tests \
70 --without-gtkmm \
71 --without-gtkmm3 \
72 --without-xerces \
73 --without-pam \
74 --disable-grabbitmqproxy \
75 --disable-vgauth \
76 --without-root-privileges \
77 --without-kernel-modules \
78 --with-tirpc \
79 --without-x \
80 --without-gtk2 \
81 --without-gtk3 \
82 --without-xerces \
83 --enable-resolutionkms=no
84
85 TARGET_LDFLAGS+=$(if $(ICONV_FULL),-liconv)
86
87 define Build/Prepare
88 $(call Build/Prepare/Default)
89 mv $(PKG_BUILD_DIR)/lib/include/poll.h $(PKG_BUILD_DIR)/lib/include/vm_poll.h
90 endef
91
92 define Package/open-vm-tools/install
93 $(INSTALL_DIR) $(1)/etc/init.d/
94 $(INSTALL_BIN) ./files/vmtoolsd.init $(1)/etc/init.d/vmtoolsd
95
96 $(INSTALL_DIR) $(1)/etc/vmware-tools/
97 $(INSTALL_DATA) ./files/tools.conf $(1)/etc/vmware-tools/
98 $(CP) $(PKG_INSTALL_DIR)/etc/vmware-tools $(1)/etc/
99
100 $(INSTALL_DIR) $(1)/bin/
101 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmtoolsd $(1)/bin/
102 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-checkvm $(1)/bin/
103 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-hgfsclient $(1)/bin/
104 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-namespace-cmd $(1)/bin/
105 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-rpctool $(1)/bin/
106 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-toolbox-cmd $(1)/bin/
107 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-xferlogs $(1)/bin/
108
109 $(INSTALL_DIR) $(1)/sbin/
110 $(INSTALL_BIN) ./files/shutdown $(1)/sbin/
111 $(INSTALL_BIN) ./files/telinit $(1)/sbin/
112
113 $(INSTALL_DIR) $(1)/lib/
114 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libguestlib.so* $(1)/lib/
115 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhgfs.so* $(1)/lib/
116 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvmtools.so* $(1)/lib/
117 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libDeployPkg.so* $(1)/lib/
118
119 $(INSTALL_DIR) $(1)/usr/lib/open-vm-tools/plugins/common/
120 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/common/libhgfsServer.so $(1)/usr/lib/open-vm-tools/plugins/common/
121 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/common/libvix.so $(1)/usr/lib/open-vm-tools/plugins/common/
122
123 $(INSTALL_DIR) $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
124 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libguestInfo.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
125 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libpowerOps.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
126 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libtimeSync.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
127 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libvmbackup.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
128 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libdeployPkgPlugin.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
129
130 $(INSTALL_DIR) $(1)/etc/hotplug.d/block/
131 $(INSTALL_BIN) ./files/vmware-scsi.hotplug $(1)/etc/hotplug.d/block/80-vmware-scsi
132
133 $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/de/
134 $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/de/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/de/
135 $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/de/vmtoolsd.vmsg $(1)/usr/share/open-vm-tools/messages/de/
136 $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/ko/
137 $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ko/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/ko/
138 $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ko/vmtoolsd.vmsg $(1)/usr/share/open-vm-tools/messages/ko/
139 $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/zh_CN/
140 $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/zh_CN/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/zh_CN/
141 $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/ja/
142 $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ja/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/ja/
143 $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ja/vmtoolsd.vmsg $(1)/usr/share/open-vm-tools/messages/ja/
144 endef
145
146 define Package/open-vm-tools-fuse/install
147 $(INSTALL_DIR) $(1)/bin/
148 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmhgfs-fuse $(1)/bin/
149 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-vmblock-fuse $(1)/bin/
150 endef
151
152 $(eval $(call BuildPackage,open-vm-tools))
153 $(eval $(call BuildPackage,open-vm-tools-fuse))