Want more features on Pastebin? Sign Up, it's FREE!
Guest

r592-driver PKGBUILD

By: a guest on Jan 4th, 2011  |  syntax: Bash  |  size: 1.50 KB  |  views: 203  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Author:  Stunts <f.pinamartins@gmail.com>
  2. # Contibutor: ianux <ianux@free.fr>
  3.  
  4. pkgname=r592-driver
  5. pkgver=20110105
  6. pkgrel=1
  7. pkgdesc="A driver for the Ricoh r592 Memory Stick reader"
  8. arch=(i686 x86_64)
  9. license=('GPLv2')
  10. depends=('kernel26')
  11. makedepends=('git')
  12. url="http://gitorious.org/ricoh-kernel/ricoh-kernel/trees/master"
  13. source=()
  14. install=${pkgname}.install
  15.  
  16. _gitroot=git://gitorious.org/ricoh-kernel/memstick/ricoh-kernel.git
  17. _gitname=ricoh-kernel
  18.  
  19. build() {
  20.   cd ${srcdir}
  21.   msg "Connecting to gitorious.org GIT server..."
  22.   if [ -d ${_gitname} ] ; then
  23.     pushd ${_gitname} && git pull origin && popd
  24.     msg "The local files are updated."
  25.   else
  26.     git clone ${_gitroot}
  27.   fi
  28.   msg "GIT checkout done or server timeout"
  29.   msg "Starting make..."
  30.  
  31.   [ -d ${_gitname}-build ] && rm -rf ${_gitname}-build
  32.   cp -r ${_gitname} ${_gitname}-build
  33.   cd ${_gitname}-build/memstick
  34.  
  35.   make
  36. }
  37. package() {
  38.   install -d ${pkgdir}/lib/modules/$(uname -r)/updates
  39.   install -m644 ${srcdir}/${_gitname}-build/memstick/core/{memstick.ko,mspro_block.ko} ${pkgdir}/lib/modules/$(uname -r)/updates/
  40.   install -Dm644 ${srcdir}/${_gitname}-build/memstick/core/ms_block.ko ${pkgdir}/lib/modules/$(uname -r)/kernel/drivers/memstick/core/ms_block.ko
  41.   install -Dm644 ${srcdir}/${_gitname}-build/memstick/host/r592.ko ${pkgdir}/lib/modules/$(uname -r)/kernel/drivers/memstick/host/r592.ko
  42.   install -Dm644 ${srcdir}/${_gitname}-build/user/95-udisks-cardreader.rules ${pkgdir}/etc/udev/rules.d/95-udisks-ms.rules
  43. }
clone this paste RAW Paste Data