Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Mar 20th, 2013  |  syntax: Bash  |  size: 2.22 KB  |  views: 94  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #Maintainer: Shaumux <shaumya "at" gmail {dot} com>
  2.  
  3. pkgname=vmware-modules
  4. pkgver=271.2
  5. pkgrel=1
  6. pkgdesc="VMware kernel modules"
  7. arch=('i686' 'x86_64')
  8. url="http://www.vmware.com/"
  9. license=('GPL2')
  10. conflicts=('open-vm-tools-modules')
  11. _MINOR=$(echo ${pkgver} | cut -d . -f 2)
  12. depends=("vmware-player=5.0.${_MINOR}")
  13. makedepends=('linux-headers')
  14. options=('!buildflags')
  15. install=${pkgname}.install
  16. source=('vmblock.tar' 'vmci.tar' 'vmmon.tar' 'vmnet.tar' 'vsock.tar' '271-putname.patch' '271-apic.patch' '60-vmware.rules')
  17. sha256sums=('5fa33a15764f7bdfcab0f153ff7ac66c8b5d3fa1d50b6bc06a9082ada9ce69b9'
  18.             'a30ad6965bd0bd2d7762fb0e12e288ebc6856242b5ee9ef978caee84d6fa11b7'
  19.             'fa45f5ffafaaa6cce695a0862a7f3788a512fe3976ec913a161ea7eb5c9c2671'
  20.             '3a01302c0681aea9466353b301d1e7a63bd6ba22c30c85f25c677b3a45e547fb'
  21.             '260a0fab437e048c434944bba0217d410f8ee6a2e025953d1a8f286ec02f93b6'
  22.             'b8103d3c72c24696e974e49dcdcdf2d5a2b2c2fdd5f6ca050842b840e906ba77'
  23.             '60e7df881281fedcabe9ea4427b324b5e1142a1a2b6ab5236ac0843bd1051048'
  24.             '654a11be0b0a6f0f4f8fdc32f8a92542cec637e0f6c62dd7097d3cf679c06f4d')
  25. build() {
  26.         _kernver=$(pacman -Q linux | cut -d . -f 2 | cut -f 1 -d -)
  27.         VMWARE_MODULE_LIST="vmblock vmci vmmon vmnet vsock"
  28.         patch -p1 < ${srcdir}/271-apic.patch
  29.         #patch -p1 < ${srcdir}/271-makefile-dirs.patch
  30.         chmod +w ${srcdir}/vmblock-only/linux/control.c
  31.         [[ ${_kernver} -ge 7 ]] && patch -p1 < ${srcdir}/271-putname.patch
  32.         for mod in ${VMWARE_MODULE_LIST}; do
  33.                 cd ${srcdir}/${mod}-only
  34.                 [[ ${mod} == 'vsock' ]] && cp ${srcdir}/vmci-only/Module.symvers ./
  35.                 make || return 1
  36.         done
  37. }
  38.  
  39. package() {
  40.           _kernver=$(pacman -Q linux | cut -d . -f 2 | cut -f 1 -d -)
  41.           depends=("linux>=3.${_kernver}" "linux<3.$(expr ${_kernver} + 1)")
  42.           KERNEL_VERSION=$(cat /usr/lib/modules/extramodules-3.${_kernver}-ARCH/version)
  43.           msg "Kernel = $KERNEL_VERSION"
  44.           mkdir -p $pkgdir/usr/lib/modules/extramodules-3.${_kernver}-ARCH/
  45.           cd "$srcdir"
  46.           find -type f -name '*.ko' \
  47.                -exec install -t "$pkgdir/usr/lib/modules/extramodules-3.$_kernver-ARCH" {} +
  48.           gzip "$pkgdir/usr/lib/modules/extramodules-3.$_kernver-ARCH"/*.ko
  49.           install -D -m0644 "$srcdir"/60-vmware.rules "$pkgdir"/etc/udev/rules.d/60-vmware.rules
  50. }