c54dbcbadca69fdca4aca5cd700a14e4002b3df2
[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 +glib2 +libpthread +libtirpc
39 TITLE:=open-vm-tools
40 URL:=https://github.com/vmware/open-vm-tools
41 MAINTAINER:=Yuhei OKAWA <tochiro.srchack@gmail.com>
42 endef
43
44 define Package/open-vm-tools/description
45 Open Virtual Machine Tools for VMware guest OS
46 endef
47
48 define Package/open-vm-tools-fuse
49 $(call Package/open-vm-tools/Default)
50 DEPENDS:=+open-vm-tools +libfuse3
51 TITLE:=open-vm-tools-fuse
52 MAINTAINER:=Kagurazaka Kotori <kagurazakakotori@gmail.com>
53 endef
54
55 define Package/open-vm-tools-fuse/description
56 Shared Folders user mode FUSE client support for VMware guest OS
57 endef
58
59 CONFIGURE_ARGS+= \
60 --without-icu \
61 --disable-containerinfo \
62 --disable-multimon \
63 --disable-docs \
64 --disable-tests \
65 --without-gtkmm \
66 --without-gtkmm3 \
67 --without-xerces \
68 --without-pam \
69 --disable-grabbitmqproxy \
70 --disable-vgauth \
71 --disable-deploypkg \
72 --without-root-privileges \
73 --without-kernel-modules \
74 --without-dnet \
75 --with-tirpc \
76 --without-x \
77 --without-gtk2 \
78 --without-gtk3 \
79 --without-xerces \
80 --enable-resolutionkms=no
81
82 TARGET_LDFLAGS += -liconv
83
84 define Build/Prepare
85 $(call Build/Prepare/Default)
86 mv $(PKG_BUILD_DIR)/lib/include/poll.h $(PKG_BUILD_DIR)/lib/include/vm_poll.h
87 endef
88
89 define Package/open-vm-tools/install
90 $(INSTALL_DIR) $(1)/etc/init.d/
91 $(INSTALL_BIN) ./files/vmtoolsd.init $(1)/etc/init.d/vmtoolsd
92
93 $(INSTALL_DIR) $(1)/etc/vmware-tools/
94 $(INSTALL_DATA) ./files/tools.conf $(1)/etc/vmware-tools/
95 $(CP) $(PKG_INSTALL_DIR)/etc/vmware-tools $(1)/etc/
96
97 $(INSTALL_DIR) $(1)/bin/
98 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmtoolsd $(1)/bin/
99 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-checkvm $(1)/bin/
100 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-hgfsclient $(1)/bin/
101 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-namespace-cmd $(1)/bin/
102 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-rpctool $(1)/bin/
103 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-toolbox-cmd $(1)/bin/
104 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-xferlogs $(1)/bin/
105
106 $(INSTALL_DIR) $(1)/sbin/
107 $(INSTALL_BIN) ./files/shutdown $(1)/sbin/
108
109 $(INSTALL_DIR) $(1)/lib/
110 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libguestlib.so* $(1)/lib/
111 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libhgfs.so* $(1)/lib/
112 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libvmtools.so* $(1)/lib/
113
114 $(INSTALL_DIR) $(1)/usr/lib/open-vm-tools/plugins/common/
115 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/common/libhgfsServer.so $(1)/usr/lib/open-vm-tools/plugins/common/
116 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/common/libvix.so $(1)/usr/lib/open-vm-tools/plugins/common/
117
118 $(INSTALL_DIR) $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
119 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libguestInfo.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
120 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libpowerOps.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
121 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libtimeSync.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
122 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libvmbackup.so $(1)/usr/lib/open-vm-tools/plugins/vmsvc/
123
124 $(INSTALL_DIR) $(1)/etc/hotplug.d/block/
125 $(INSTALL_BIN) ./files/vmware-scsi.hotplug $(1)/etc/hotplug.d/block/80-vmware-scsi
126
127 $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/de/
128 $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/de/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/de/
129 $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/de/vmtoolsd.vmsg $(1)/usr/share/open-vm-tools/messages/de/
130 $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/ko/
131 $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ko/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/ko/
132 $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ko/vmtoolsd.vmsg $(1)/usr/share/open-vm-tools/messages/ko/
133 $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/zh_CN/
134 $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/zh_CN/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/zh_CN/
135 $(INSTALL_DIR) $(1)/usr/share/open-vm-tools/messages/ja/
136 $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ja/toolboxcmd.vmsg $(1)/usr/share/open-vm-tools/messages/ja/
137 $(CP) $(PKG_INSTALL_DIR)/usr/share/open-vm-tools/messages/ja/vmtoolsd.vmsg $(1)/usr/share/open-vm-tools/messages/ja/
138 endef
139
140 define Package/open-vm-tools-fuse/install
141 $(INSTALL_DIR) $(1)/bin/
142 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmhgfs-fuse $(1)/bin/
143 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vmware-vmblock-fuse $(1)/bin/
144 endef
145
146 $(eval $(call BuildPackage,open-vm-tools))
147 $(eval $(call BuildPackage,open-vm-tools-fuse))