# Maintainer: Natanael Copa _flavor=grsec _kpkg=linux-$_flavor _realname=open-vm-tools _kver=4.4.39 _kpkgrel=1 _realver=10.0.7 _ver=${_realver/_p/-} _mypkgrel=0 # source open-vm-tools version if [ -f ../main/$_realname/APKBUILD ]; then . ../main/$_realname/APKBUILD [ "${_realver}" != "$pkgver" ] && pkgname=$_realname-$_flavor \ && die "please set _realver to $pkgver" fi # source the kernel version if [ -f ../main/linux-${_flavor}/APKBUILD ]; then . ../main/linux-${_flavor}/APKBUILD [ "$_kver" != "$pkgver" ] && die "please set _kver to $pkgver" [ "$_kpkgrel" != "$pkgrel" ] && die "please set _kpkgrel to $pkgrel" fi _abi_release=${_kver}-${_kpkgrel}-${_flavor} _kernelver="$_kver-r$_kpkgrel" pkgname="$_realname-$_flavor" pkgver=$_kver pkgrel=$(($_kpkgrel + $_mypkgrel)) 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="" depends="linux-${_flavor}=${_kernelver}" depends_dev="bash glib-dev gettext-dev linux-${_flavor}-dev=${_kernelver}" makedepends="$depends_dev autoconf automake libtool linux-headers" source="https://github.com/vmware/open-vm-tools/archive/stable-$_ver.tar.gz 0001-Fix-vmxnet-module-on-kernels-3.16.patch " install_if="linux-${_flavor}=${_kernelver} open-vm-tools" _builddir="$srcdir/open-vm-tools-stable-$_ver"/open-vm-tools prepare() { cd "$_builddir" update_config_sub || return 1 for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done libtoolize && aclocal && autoconf && automake --add-missing } build() { cd "$_builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ --disable-deploypkg \ --without-pam \ --without-x \ --without-dnet \ --without-icu \ --without-procps \ --without-ssl \ --with-kernel-release="${_abi_release}" \ || return 1 cd "$_builddir"/modules make -j1 modules MODULES="vmxnet vmhgfs" || return 1 } package() { cd "$_builddir" mkdir -p "$pkgdir"/etc/modules-load.d/ cat >"$pkgdir"/etc/modules-load.d/open-vm-tools<