# Maintainer: Natanael Copa _flavor=vserver _realname=open-vm-tools _name=$_realname-$_flavor _kpkg=linux-$_flavor _kver=3.6.4 _kpkgrel=0 _myvsver=vs2.3.4.3-noxfs-nocow _mypkgrel=0 _realver=9.2.0_p799703 _ver=${_realver/_p/-} # source open-vm-tools version if [ -f ../main/$_realname/APKBUILD ]; then . ../main/$_realname/APKBUILD pkgname=$_realname-$_flavor [ "${_realver}" != "$pkgver" ] && die "please set _realver to $pkgver" fi # source the kernel version if [ -f ../linux-${_flavor}/APKBUILD ]; then . ../linux-${_flavor}/APKBUILD pkgname=$_realname-$_flavor [ "$_kver" != "$pkgver" ] && die "$_name: please set _kver to $pkgver" [ "$_kpkgrel" != "$pkgrel" ] && die "$_name: please set _kpkgrel to $pkgrel" [ "$_myvsver" != "$_vsver" ] && die "$_name: please set _myvsver to $_vsver" fi _abi_release=${_kver}-$_vsver _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="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/project/open-vm-tools/open-vm-tools/stable-${_realver%.*}.x/open-vm-tools-${_ver}.tar.gz linux-3.6-build-fix.patch vmware-modules.initd " install_if="linux-${_flavor}=${_kernelver} open-vm-tools" _builddir="$srcdir/$_realname-$_ver" prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } 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="37341978a00a1568b898a8ce024f9da9 open-vm-tools-9.2.0-799703.tar.gz d9ffaf628837ea6a216b96dac69705e6 linux-3.6-build-fix.patch afba2c3487d0b12cee80eb2f04b05ba1 vmware-modules.initd"