summaryrefslogtreecommitdiff
path: root/community/open-vm-tools-modules/PKGBUILD
blob: da5b81257ac05596f564c2ee8a498d3e7a8ee288 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
}