PKGBUILDs/community/open-vm-tools-modules/PKGBUILD
2009-10-09 21:15:33 -05:00

50 lines
1.6 KiB
Bash

# $Id: PKGBUILD 3174 2009-09-29 10:26:30Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Krzysztof Raczkowski <raczkow@gmail.com>
pkgname=open-vm-tools-modules
pkgver=2009.09.18
_pkgsubver=193784
_kernver=`pacman -Q kernel26 | cut -d . -f 3 | cut -f 1 -d -`
pkgrel=2
pkgdesc="The Open Virtual Machine Tools (open-vm-tools) are the open source implementation of VMware Tools."
arch=('i686' 'x86_64')
url="http://open-vm-tools.sourceforge.net/"
license=('GPL')
makedepends=('libdnet' 'icu')
depends=("kernel26>=2.6.${_kernver}" "kernel26<2.6.`expr ${_kernver} + 1`")
install=$pkgname.install
source=(http://easynews.dl.sourceforge.net/sourceforge/open-vm-tools/open-vm-tools-$pkgver-${_pkgsubver}.tar.gz)
md5sums=('90c79c24756f0b6cc3d42faed10f5c1b')
build() {
KERNEL_VERSION="2.6.${_kernver}-ARCH"
msg "Kernel = $KERNEL_VERSION"
cd "$srcdir/open-vm-tools-$pkgver-${_pkgsubver}"
sed -i 's#-lproc-3.2.7#-lproc-3.2.8#' configure
./configure --prefix=/usr --disable-unity
patch -p0 modules/linux/vmmemctl/Makefile.kernel <<EOF
--- Makefile.kernel.org 2009-09-29 14:21:56.000000000 +0400
+++ Makefile.kernel 2009-09-29 14:20:31.000000000 +0400
@@ -50,6 +50,7 @@
\$(Q)\$(rule_cc_o_c)
\$(DRIVER)-y += \$(LIBBACKDOOR)
+\$(DRIVER)-y += \$(VMMEMCTL_SHARED)
endif
EXTRA_CFLAGS := \$(CC_OPTS) \$(INCLUDE)
EOF
(cd modules && make modules) || return 1
for MOD in vmblock vmhgfs vmmemctl vmsync vmxnet; do
install -D -m644 modules/linux/$MOD/$MOD.ko $pkgdir/lib/modules/$KERNEL_VERSION/misc/$MOD.ko || return 1
done
sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='$KERNEL_VERSION'/" $startdir/$pkgname.install
}