Advertisement
Guest User

PKGBUILD activdriver new version

a guest
Aug 30th, 2014
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.49 KB | None | 0 0
  1. # Maintainer: Bazon ...
  2. # Contributor: Christian Bühler ...
  3. # Contributor: Zsolt Udvari ...
  4. pkgname=activdriver
  5. pkgver=5.9.27
  6. pkgrel=1
  7. pkgdesc="The kernel mode and X11 drivers for Promethean ActivBoard and ActivHub."
  8. arch=('i686' 'x86_64')
  9. url="http://activsoftware.co.uk/linux/repos/ubuntu/dists/precise/Release"
  10. license=('unknown')
  11. makedepends=(linux-headers)
  12. optdepends=('activinspire: activboard presentation'
  13.             'activtools: hardware calibration')
  14. install=$pkgname.install
  15. if [ "$CARCH" = "i686" ]; then
  16.   _arch='i386'
  17.   _md5sum='6c5ccb193513bee9a900ff33bb2a581e'
  18. elif [ "$CARCH" = "x86_64" ]; then
  19.   _arch='amd64'
  20.   _md5sum='db31b7041d795ccb587aaae8a22d2a82'
  21. fi
  22. source=(http://activsoftware.co.uk/linux/repos/ubuntu/pool/oss/a/$pkgname/${pkgname}_$pkgver-1~ubuntu~1204_$_arch.deb
  23.         10-promethean.conf)
  24. md5sums=( $_md5sum
  25.          '11effc25fd592acacb9f9f3108618963')
  26.  
  27. build() {
  28.   tar xf data.tar.gz
  29.   echo " "
  30.   echo "Attention!"
  31.   echo "Build will fail if run in a directory with space(s) in its path."
  32.   #(reason: makefile of the source. if you know how to fix: please tell!)
  33.   echo " "
  34.   make -C /lib/modules/$(uname -r)/build SUBDIRS="$srcdir"/usr/src/promethean/kernel modules
  35.   sed -i "s%KERN_INC = /usr/src/promethean%KERN_INC = ..%" usr/src/promethean/activlc/Makefile
  36.   BUILD=release make -C usr/src/promethean/activlc
  37.   sed -i s%/usr/local/bin/%%g usr/bin/promethean.sh
  38. }
  39.  
  40. package() {
  41.   mkdir -p "$pkgdir"/usr
  42.   cp -r etc lib "$pkgdir"
  43.   cp -r usr/bin usr/lib usr/share "$pkgdir"/usr
  44.   install -D usr/src/promethean/activlc/release/activlc "$pkgdir"/usr/bin/activlc
  45.   _extmoddir=$(uname -r | sed "s@\([0-9]*\.[0-9]*\)\.[0-9]*-[0-9]*\(.*\)@\1\2@")
  46.  
  47.   # changed compared to pkgrel=1: needs to be this path now:
  48.   _moddir="/usr/lib/modules/extramodules-${_extmoddir}"/kernel/drivers/input/tablet/
  49.  
  50.   install -m644 -D usr/src/promethean/kernel/promethean.ko \
  51.     "$pkgdir${_moddir}"/promethean.ko
  52.   find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
  53.   install -D 10-promethean.conf "$pkgdir"/etc/X11/xorg.conf.d/10-promethean.conf
  54.  
  55.   # changed compared to pkgrel=1: move /lib to /usr/lib to match arch standards
  56.   mv "${pkgdir}"/lib/* "${pkgdir}"/usr/lib/
  57.   rmdir "${pkgdir}"/lib
  58.  
  59.   # changed compared to pkgrel=1: load module on boot.
  60.   # If you don't want this, delete the following lines and load it manually with sudo modprobe promethean
  61.   mkdir -p "$pkgdir"/etc/modules-load.d
  62.   echo "promethean" > "$pkgdir"/etc/modules-load.d/promethean.conf
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement