#!/usr/bin/make -f DEBHELPER_VERSION = $(strip $(shell dpkg-query -f '$${Version}' -W debhelper)) DEBHELPER_SYSTEMD_OK = $(strip $(shell dpkg --compare-versions $(DEBHELPER_VERSION) ge 10.9.1~; echo $$?)) ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes) VENDOR := UBUNTU else VENDOR := DEBIAN endif %: dh ${@} --sourcedirectory=open-vm-tools override_dh_auto_configure: dh_auto_configure --sourcedirectory=open-vm-tools -- \ --prefix=/usr \ --libdir=\$${prefix}/lib \ --without-kernel-modules \ --with-pic \ --enable-xmlsec1 \ --with-gtk3 \ --enable-servicediscovery \ CFLAGS="-fPIC -Wno-error=deprecated-declarations -Wno-error=address-of-packed-member -Wno-nonnull $(CFLAGS)" \ CUSTOM_PROCPS_NAME=procps override_dh_auto_install: dh_auto_install --sourcedirectory=open-vm-tools -- DESTDIR=$(CURDIR)/debian/open-vm-tools if [ -e debian/open-vm-tools/etc/pam.d/vmtoolsd-x64 ]; \ then \ sed -i -e "s|lib64|lib|g" debian/open-vm-tools/etc/pam.d/vmtoolsd-x64; \ mv debian/open-vm-tools/etc/pam.d/vmtoolsd-x64 debian/open-vm-tools/etc/pam.d/vmtoolsd; \ fi # permissions chmod 0644 debian/*/etc/pam.d/* chmod 4755 debian/*/usr/bin/vmware-user-suid-wrapper chmod 0644 debian/*/lib/udev/rules.d/99-vmware-scsi-udev.rules install -D -m 0644 debian/local/xautostart.conf debian/open-vm-tools-desktop/etc/vmware-tools/xautostart.conf install -D -m 0644 debian/local/tools.conf debian/open-vm-tools/etc/vmware-tools/tools.conf install -D -m 0644 debian/local/run-vmblock\\x2dfuse.mount debian/open-vm-tools-desktop/lib/systemd/system/run-vmblock\\x2dfuse.mount install -D -m 0644 debian/local/open-vm-tools-desktop.conf debian/open-vm-tools-desktop/usr/lib/modules-load.d/open-vm-tools-desktop.conf # open-vm-tools-dev mkdir -p debian/open-vm-tools-dev/usr/share/doc/open-vm-tools mv debian/open-vm-tools/usr/share/doc/open-vm-tools/api debian/open-vm-tools-dev/usr/share/doc/open-vm-tools mkdir -p debian/open-vm-tools-dev/usr/lib mv \ debian/open-vm-tools/usr/lib/*.a \ debian/open-vm-tools/usr/lib/*.so \ debian/open-vm-tools/usr/lib/pkgconfig \ debian/open-vm-tools-dev/usr/lib mv debian/open-vm-tools/usr/include debian/open-vm-tools-dev/usr # removing useless files rm -f debian/open-vm-tools/usr/lib/*.la rm -f debian/open-vm-tools/usr/lib/open-vm-tools/plugins/*/*.la rm -rf debian/open-vm-tools/usr/share/open-vm-tools/tests # mount(8) calls the program as /sbin/mount.vmhgfs mv debian/open-vm-tools/usr/sbin/mount.vmhgfs debian/open-vm-tools/sbin/ # moving open-vm-tools-desktop files mkdir -p debian/open-vm-tools-desktop/usr/lib/open-vm-tools/plugins mv debian/open-vm-tools/usr/lib/open-vm-tools/plugins/vmusr debian/open-vm-tools-desktop/usr/lib/open-vm-tools/plugins mkdir -p debian/open-vm-tools-desktop/usr/bin mv debian/open-vm-tools/usr/bin/vmware-user-suid-wrapper debian/open-vm-tools-desktop/usr/bin mv debian/open-vm-tools/usr/bin/vmware-user debian/open-vm-tools-desktop/usr/bin mkdir -p debian/open-vm-tools-desktop/etc/xdg/autostart mv debian/open-vm-tools/etc/xdg/autostart/vmware-user.desktop debian/open-vm-tools-desktop/etc/xdg/autostart rm -rf debian/open-vm-tools/etc/xdg mkdir -p debian/open-vm-tools-desktop/lib/systemd/system/open-vm-tools.service.d cp debian/desktop.conf debian/open-vm-tools-desktop/lib/systemd/system/open-vm-tools.service.d/ mkdir -p debian/open-vm-tools-sdmp/usr/lib/open-vm-tools/plugins/vmsvc/ mv debian/open-vm-tools/usr/lib/open-vm-tools/plugins/vmsvc/libserviceDiscovery.so debian/open-vm-tools-sdmp/usr/lib/open-vm-tools/plugins/vmsvc/ mkdir -p debian/open-vm-tools-sdmp/usr/lib/open-vm-tools/serviceDiscovery/scripts/ mv debian/open-vm-tools/usr/lib/open-vm-tools/serviceDiscovery/scripts/* debian/open-vm-tools-sdmp/usr/lib/open-vm-tools/serviceDiscovery/scripts/ rm -rf debian/open-vm-tools/usr/lib/open-vm-tools/serviceDiscovery/ override_dh_gencontrol: if [ "${VENDOR}" = "UBUNTU" ]; \ then \ dh_gencontrol -- -Vmodaliases="vmwgfx(pci:v000015ADd00000405sv*sd*bc*sc*i*)"; \ else \ dh_gencontrol; \ fi override_dh_fixperms: dh_testroot find debian/open-vm-tools/etc -type f -print0 | xargs -0 chmod ugo-x chmod ugo+x debian/open-vm-tools/etc/vmware-tools/scripts/vmware/* chmod ugo+x debian/open-vm-tools/etc/vmware-tools/*-vm-default dh_fixperms -Xvmware-user-suid-wrapper override_dh_installsystemd: dh_installsystemd -popen-vm-tools dh_installsystemd -popen-vm-tools --name vgauth dh_installsystemd -popen-vm-tools-desktop --restart-after-upgrade --no-stop-on-upgrade run-vmblock\\x2dfuse.mount override_dh_installchangelogs: dh_installchangelogs ReleaseNotes.md override_dh_md5sums-arch: dh_md5sums # remove broken \ escaping from md5sums sed -i -e 's,^\\,,' -e 's,\\\\,\\,' debian/open-vm-tools-desktop/DEBIAN/md5sums