# Maintainer: Natanael Copa pkgname=open-vm-tools pkgver=10.1.0 _pkgsubver=${pkgver#*_p} _ver=${pkgver/_p/-} pkgrel=2 pkgdesc="The Open Virtual Machine Tools are the open source implementation of VMware Tools." url="https://github.com/vmware/open-vm-tools/" arch="x86 x86_64" license="LGPL" subpackages="$pkgname-dbg $pkgname-gtk $pkgname-dev" install="$pkgname.pre-install" makedepends="procps-dev libdnet-dev icu-dev glib-dev bash icu-dev gtk+-dev libxext-dev libxinerama-dev libxtst-dev gtkmm-dev fuse-dev libnotify-dev libxrandr-dev libxcomposite-dev libice-dev libsm-dev libtirpc-dev linux-headers libmspack-dev libressl-dev rpcgen automake autoconf libtool m4 " source="$pkgname-$pkgver.tar.gz::https://github.com/vmware/open-vm-tools/archive/stable-$_ver.tar.gz 0001-remove-autotools-generated-files.patch 0002-lib-misc-Recognize-Alpine-Linux.patch 0003-open-vm-tools-Add-disable-werror-configure-option.patch 0004-Do-not-assume-that-linux-and-gnu-libc-are-the-same-t.patch 0005-Use-configure-test-for-struct-timespec.patch 0006-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch 0007-Use-configure-to-test-for-feature-instead-of-platfor.patch 0008-Use-configure-test-for-sys-stat.h-include.patch 0009-Rename-poll.h-to-vm_poll.h.patch 0010-Add-support-for-building-with-system-libtirpc.patch 0011-gnu-ucontext.patch 0012-use-posix-strerror_r-unless-gnu.patch 0013-use-off64_t-instead-of-loff_t.patch 0014-remove-references-to-missing-common-agent-etc-config.patch open-vm-tools.initd " builddir="$srcdir"/open-vm-tools-stable-$_ver build() { export CUSTOM_PROCPS_NAME="procps" export CFLAGS="$CFLAGS -Wno-unused-but-set-variable -D_GNU_SOURCE" export CXXFLAGS="$CXXFLAGS -std=gnu++11 -fpermissive" cd "$builddir"/open-vm-tools autoreconf -vif || return 1 ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --without-dnet \ --without-xerces \ --with-icu \ --with-procps \ --with-x \ --without-kernel-modules \ --without-pam \ --disable-werror \ || return 1 make || return 1 } package() { cd "$builddir"/open-vm-tools make install DESTDIR=$pkgdir || return 1 install -Dm755 "$srcdir"/open-vm-tools.initd \ "$pkgdir"/etc/init.d/open-vm-tools mkdir -p "$pkgdir"/etc/modules-load.d/ cat >"$pkgdir"/etc/modules-load.d/open-vm-tools<