# $Id: PKGBUILD 59404 2011-11-24 12:19:55Z spupykin $ # Maintainer: Sergej Pupykin # Contributor: Krzysztof Raczkowski pkgname=open-vm-tools-modules pkgver=2011.11.20 _pkgsubver=535097 pkgrel=1 pkgdesc="kernel modules for the open source implementation of VMware Tools" arch=('i686' 'x86_64' 'mips64el') url="http://open-vm-tools.sourceforge.net/" license=('GPL') makedepends=('libdnet' 'icu' 'uriparser' 'linux-headers') depends=("linux") install=$pkgname.install options=('!strip') source=("http://downloads.sourceforge.net/open-vm-tools/open-vm-tools-$pkgver-${_pkgsubver}.tar.gz" "modprobe.conf") md5sums=('428d803f6fe3424af88768fc2f88f9ae' 'ac9b8e3cb798f5056ca92767ec705117') 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 -Dm644 $MOD $pkgdir/lib/modules/extramodules-3.${_kernver}-ARCH/ done sed -i -e "s/KERNEL_VERSION='.*'/KERNEL_VERSION='$KERNEL_VERSION'/" $startdir/$pkgname.install gzip $pkgdir/lib/modules/extramodules-3.${_kernver}-ARCH/*.ko install -D -m 644 ${srcdir}/modprobe.conf ${pkgdir}/etc/modprobe.d/${pkgname}.conf }