Pastebin is 300% more awesome when you are logged in. Sign Up, it's FREE!
Guest

Fabio Varesano - Arduino PKGBUILD

By: a guest on Oct 5th, 2010  |  syntax: Bash  |  size: 1.81 KB  |  hits: 145  |  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. pkgname=arduino
  2. pkgver=0021
  3. pkgrel=1
  4. pkgdesc="The Arduino IDE - 32 and 64bit version"
  5. arch=('i686' 'x86_64')
  6. url="http://www.arduino.cc/"
  7. license=('GPL')
  8. depends=('avr-libc' 'java-runtime' 'avrdude' 'libusb' 'bash' )
  9. source=("http://arduino.googlecode.com/files/${pkgname}-${pkgver}.tgz"
  10. arduino.desktop
  11. arduino.png)
  12. conflicts=('arduino64')
  13. if [ "${CARCH}" == 'i686' ]; then
  14. source=("http://arduino.googlecode.com/files/${pkgname}-${pkgver}.tgz"
  15.         arduino.desktop
  16.         arduino.png)
  17. md5sums=('0f53873712b51774e96c0bdf987289dd'
  18.         'eebc4d6495864bea99ad057af801afb9'
  19.         '9e36d33891d5e68d38ec55d1494499a5')
  20. elif  [ "${CARCH}" == 'x86_64' ]; then
  21. source=("http://files.arduino.cc/downloads/${pkgname}-${pkgver}-2.tgz"
  22.         arduino.desktop
  23.         arduino.png)
  24. md5sums=('e3a6d834682b3694fc2f58ba7d5e24a1'
  25.         'eebc4d6495864bea99ad057af801afb9'
  26.         '9e36d33891d5e68d38ec55d1494499a5')
  27. fi
  28. build() {
  29.  
  30.   install -d ${pkgdir}/usr/share
  31.   cp -r ${srcdir}/${pkgname}-${pkgver} ${pkgdir}/usr/share/arduino
  32.   find ${pkgdir}/usr/share/arduino -type d -exec chmod 755 '{}' \;
  33.   find ${pkgdir}/usr/share/arduino -type f -exec chmod 644 '{}' \;
  34.   chmod 755 ${pkgdir}/usr/share/arduino/arduino
  35.  
  36.   rm ${pkgdir}/usr/share/arduino/hardware/tools/avrdude
  37.   ln -s /usr/bin/avrdude ${pkgdir}/usr/share/arduino/hardware/tools/avrdude
  38.  
  39.   #Generate script to run arduino
  40.   install -d ${pkgdir}/usr/bin
  41.   cat <<EOF > ${pkgdir}/usr/bin/arduino
  42. #!/bin/bash
  43. cd /usr/share/arduino
  44. ./arduino
  45. EOF
  46.   chmod 755 ${pkgdir}/usr/bin/arduino
  47.   #Create icon in kde/gnome menu
  48.   mkdir -p $pkgdir/usr/share/applications/
  49.   cp $srcdir/arduino.desktop $pkgdir/usr/share/applications
  50.   mkdir -p $pkgdir//usr/share/icons/hicolor/256x256/apps/  
  51.   cp $srcdir/arduino.png $pkgdir//usr/share/icons/hicolor/256x256/apps/
  52. }