summaryrefslogtreecommitdiff
path: root/community/open-vm-tools-modules
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/open-vm-tools-modules
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/open-vm-tools-modules')
-rw-r--r--community/open-vm-tools-modules/PKGBUILD40
-rw-r--r--community/open-vm-tools-modules/open-vm-tools-modules.install35
2 files changed, 75 insertions, 0 deletions
diff --git a/community/open-vm-tools-modules/PKGBUILD b/community/open-vm-tools-modules/PKGBUILD
new file mode 100644
index 000000000..da5b81257
--- /dev/null
+++ b/community/open-vm-tools-modules/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 39956 2011-02-18 23:30:08Z spupykin $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Krzysztof Raczkowski <raczkow@gmail.com>
+
+pkgname=open-vm-tools-modules
+pkgver=2011.01.24
+_pkgsubver=354108
+pkgrel=1
+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' 'uriparser' 'kernel26-headers')
+depends=("kernel26")
+install=$pkgname.install
+source=(http://easynews.dl.sourceforge.net/sourceforge/open-vm-tools/open-vm-tools-$pkgver-${_pkgsubver}.tar.gz)
+md5sums=('b324efa55bb3f1198100cad838e9272b')
+
+build() {
+_kernver=`pacman -Q kernel26 | cut -d . -f 3 | cut -f 1 -d -`
+depends=("kernel26>=2.6.${_kernver}" "kernel26<2.6.`expr ${_kernver} + 1`")
+
+ 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
+
+ [ $NOEXTRACT -eq 1 ] || ./configure --prefix=/usr
+
+ (cd modules && make modules)
+
+ mkdir -p $pkgdir/lib/modules/$KERNEL_VERSION/misc/
+ for MOD in `find -type f -name '*.ko'`; do
+ install -D -m644 $MOD $pkgdir/lib/modules/$KERNEL_VERSION/misc/
+ done
+
+ sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='$KERNEL_VERSION'/" $startdir/$pkgname.install
+}
diff --git a/community/open-vm-tools-modules/open-vm-tools-modules.install b/community/open-vm-tools-modules/open-vm-tools-modules.install
new file mode 100644
index 000000000..19c60c520
--- /dev/null
+++ b/community/open-vm-tools-modules/open-vm-tools-modules.install
@@ -0,0 +1,35 @@
+KERNEL_VERSION='2.6.37-ARCH'
+
+post_install() {
+ depmod -a -v $KERNEL_VERSION > /dev/null 2>&1
+
+ VMXNET="install pcnet32 /sbin/modprobe -q --ignore-install vmxnet;"
+ VMXNET="$VMXNET /sbin/modprobe -q --ignore-install pcnet32 $CMDLINE_OPTS;"
+ VMXNET="$VMXNET /bin/true;"
+
+ echo ">>> Enabling vmxnet driver in /etc/modprobe.d/modprobe.conf"
+ echo ">>> (this will disable pcnet32 driver)"
+ sed "$ a \\\n#VMware net driver\n$VMXNET" -i /etc/modprobe.d/modprobe.conf
+ echo
+
+ echo ">>>"
+ echo ">>> If vmxnet driver doesn't handle your NIC, you have to manually"
+ echo ">>> disable loading of pcnet32 driver by blacklisting it in /etc/rc.conf."
+ echo ">>>"
+}
+
+post_upgrade() {
+ depmod -a -v $KERNEL_VERSION > /dev/null 2>&1
+}
+
+post_remove() {
+ depmod -a -v $KERNEL_VERSION > /dev/null 2>&1
+
+ echo ">>> Disabling vmxnet driver in /etc/modprobe.d/modprobe.conf"
+ sed "/VMware net driver/,+1 d" -i /etc/modprobe.d/modprobe.conf
+
+ echo ">>>"
+ echo ">>> Remember to un-blacklist pcnet32 driver in /etc/rc.conf."
+ echo ">>>"
+}
+