diff options
author | root <root@rshg054.dnsready.net> | 2011-10-27 23:14:53 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2011-10-27 23:14:53 +0000 |
commit | 0424b5fc47f106db6498c4cda3476e1d49fe0f82 (patch) | |
tree | f5c4ef7fa0139ce627e74b3bc58f35115c7e09ff /community-testing/open-vm-tools-modules | |
parent | 84fe155e2233db86fcc13134d8802ba1dab0ae83 (diff) |
Thu Oct 27 23:14:53 UTC 2011
Diffstat (limited to 'community-testing/open-vm-tools-modules')
-rw-r--r-- | community-testing/open-vm-tools-modules/PKGBUILD | 41 | ||||
-rw-r--r-- | community-testing/open-vm-tools-modules/open-vm-tools-modules.install | 34 |
2 files changed, 75 insertions, 0 deletions
diff --git a/community-testing/open-vm-tools-modules/PKGBUILD b/community-testing/open-vm-tools-modules/PKGBUILD new file mode 100644 index 000000000..41d09db91 --- /dev/null +++ b/community-testing/open-vm-tools-modules/PKGBUILD @@ -0,0 +1,41 @@ +# $Id: PKGBUILD 57352 2011-10-26 12:09:45Z spupykin $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: Krzysztof Raczkowski <raczkow@gmail.com> + +pkgname=open-vm-tools-modules +pkgver=2011.09.23 +_pkgsubver=491607 +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' 'uriparser' 'linux-headers') +depends=("linux") +install=$pkgname.install +source=("http://downloads.sourceforge.net/open-vm-tools/open-vm-tools-$pkgver-${_pkgsubver}.tar.gz") +md5sums=('599342eee8d531b35ca1cc948b61868f') + +build() { + _kernver=`pacman -Q linux | cut -d . -f 2 | cut -f 1 -d -` + KERNEL_RELEASE=`cat /lib/modules/extramodules-3.${_kernver}-ARCH/version` + + cd "$srcdir/open-vm-tools-${pkgver}-${_pkgsubver}" + [ $NOEXTRACT -eq 1 ] || ./configure --prefix=/usr \ + --without-x --with-kernel-release=$KERNEL_RELEASE + (cd modules && make modules) +} + +package() { + _kernver=`pacman -Q linux | cut -d . -f 2 | cut -f 1 -d -` + depends=("linux>=3.${_kernver}" "linux<3.`expr ${_kernver} + 1`") + KERNEL_VERSION=`cat /lib/modules/extramodules-3.${_kernver}-ARCH/version` + msg "Kernel = $KERNEL_VERSION" + + cd "$srcdir/open-vm-tools-${pkgver}-${_pkgsubver}" + mkdir -p $pkgdir/lib/modules/extramodules-3.${_kernver}-ARCH/ + for MOD in `find -type f -name '*.ko'`; do + install -D -m644 $MOD $pkgdir/lib/modules/extramodules-3.${_kernver}-ARCH/ + done + sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='$KERNEL_VERSION'/" $startdir/$pkgname.install +} diff --git a/community-testing/open-vm-tools-modules/open-vm-tools-modules.install b/community-testing/open-vm-tools-modules/open-vm-tools-modules.install new file mode 100644 index 000000000..801d2c5b3 --- /dev/null +++ b/community-testing/open-vm-tools-modules/open-vm-tools-modules.install @@ -0,0 +1,34 @@ +KERNEL_VERSION='2.6.38-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" + 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" + echo ">>>" +} |