# Maintainer: Natanael Copa _flavor=vserver _realname=open-vm-tools _mypkgrel=3 # source open-vm-tools version if [ -f ../../main/$_realname/APKBUILD ]; then . ../../main/$_realname/APKBUILD fi _realver="$pkgver" _realsubver="$_pkgsubver" # source the kernel version if [ -f ../../main/linux-${_flavor}/APKBUILD ]; then . ../../main/linux-${_flavor}/APKBUILD fi _kernelver="$pkgver-r$pkgrel" _kpkgrel=$pkgrel pkgname="$_realname-$_flavor" pkgrel=$(($_kpkgrel + $_mypkgrel)) pkgdesc="The Open Virtual Machine Tools are the open source implementation of VMware Tools." url="http://open-vm-tools.sourceforge.net/" arch="all" license="LGPL" subpackages="" depends="linux-${_flavor}=${_kernelver}" makedepends="glib-dev gettext-dev linux-${_flavor}-dev=${_kernelver}" source="http://downloads.sourceforge.net/open-vm-tools/open-vm-tools-$_realver-$_realsubver.tar.gz vmware-modules.initd " install_if="linux-${_flavor}=${_kernelver} open-vm-tools" _builddir="$srcdir/$_realname-$_realver-$_realsubver" prepare() { cd "$_builddir" } build() { export GCC_SPECS=/usr/share/gcc/hardenednopie.specs cd "$_builddir" ./configure --without-pam \ --without-x \ --without-dnet \ --without-icu \ --without-procps \ --with-kernel-release="${_abi_release}" \ || return 1 cd "$_builddir"/modules make -j1 modules || return 1 } package() { cd "$_builddir" install -D -m755 "$srcdir"/vmware-modules.initd \ "$pkgdir"/etc/init.d/vmware-modules-${_flavor} || return 1 mkdir -p $pkgdir/lib/modules/"${_abi_release}"/misc/ cd "$_builddir"/modules for module in `find -type f -name '*.ko'`; do install -D -m644 $module "$pkgdir/lib/modules/"${_abi_release}"/misc/" done } md5sums="aa2bd6533e1543c7cbda794db7365780 open-vm-tools-2011.06.27-437995.tar.gz afba2c3487d0b12cee80eb2f04b05ba1 vmware-modules.initd"