SHARE
TWEET

Teensyduino

a guest May 3rd, 2018 237 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pkgname=teensyduino
  2. pkgver=1.41
  3. _pkgver=1.41
  4. _arduino=1.8.5
  5. pkgrel=1
  6. pkgdesc="Arduino SDK with Teensyduino"
  7. arch=('i686' 'x86_64')
  8. url="http://www.pjrc.com/teensy/teensyduino.html"
  9. options=(!strip staticlibs)
  10. license=('GPL' 'LGPL' 'custom')
  11. depends=('gtk2' 'libusb-compat' 'libusb' 'java-runtime' 'libpng12' 'libsm'
  12.          'desktop-file-utils' 'giflib' 'avrdude')
  13. makedepends=('xorg-server-xvfb' 'libxft' 'xdotool' 'git')
  14. provides=('arduino')
  15. conflicts=('arduino' 'teensy-loader-cli')
  16. install="teensyduino.install"
  17. source=('arduino.xml'
  18.         'teensyduino.sh'
  19.         'teensy-loader.desktop'
  20.         "git+https://github.com/PaulStoffregen/teensy_loader_cli.git#commit=82224e355f211efdd1e165e14ae773d85cc22e93"
  21.         "http://www.pjrc.com/teensy/49-teensy.rules"
  22.         'LICENSE')
  23. source_i686+=("http://downloads.arduino.cc/arduino-${_arduino}-linux32.tar.xz"
  24.               "http://www.pjrc.com/teensy/td_${_pkgver//./}/TeensyduinoInstall.linux32")
  25. source_x86_64+=("http://downloads.arduino.cc/arduino-${_arduino}-linux64.tar.xz"
  26.                 "http://www.pjrc.com/teensy/td_${_pkgver//./}/TeensyduinoInstall.linux64")
  27. sha256sums=('473b82156505e9bd903e4d8484e8d183f2e3bf3c1f7e29940b815929ae597b68'
  28.             '0ad3b85a1b5a9a0dc0cd64685742b66368a338777a80a0bff29d01ac26816173'
  29.             '270b55353eb438d3790c7245e5ae16ff8bac9f98cfe927d6c9f2146a34499323'
  30.             'SKIP'
  31.             '031de0b26991b5a3b19c497d9c0a17f86c40c55d925b9d07d19ab89f2286469d'
  32.             '25980feb5927b8bea8b8e999f5002e110825b1bc3d546fa902c2db5c824d33f3')
  33. sha256sums_i686=('9c0e41d45d8b5d9c87e021fad6ed3c740002cb74f1a9c79b007717ac125539e5'
  34.                  'a8e3dac44b387784a038e6f4e3b4c898ad3c4abf7783943dbd12a36a158e360d')
  35. sha256sums_x86_64=('bdf985da7289c02f8b7761a9a524921f6535fe4cec27a5fc57ce305afc1a1ab9'
  36.                    'caedbfe8253768d99cdc44389a919c361952c4a33b8dbbd4bf4be4b7ebe142ce')
  37.  
  38. if [ "$CARCH" == 'x86_64' ]; then
  39.   _bits=64
  40. elif [ "$CARCH" == 'i686' ]; then
  41.   _bits=32
  42. fi
  43.  
  44. build() {
  45.   msg2 "Running Teensyduino installer (takes around 50 seconds)"
  46.  
  47.   chmod +x "TeensyduinoInstall.linux${_bits}"
  48.   xvfb-run ./teensyduino.sh "./TeensyduinoInstall.linux${_bits}" "${srcdir}/arduino-${_arduino}"
  49.  
  50.   msg2 "Building Teensy Loader command line"
  51.  
  52.   cd teensy_loader_cli
  53.   make
  54. }
  55.  
  56. package() {
  57.   cd "arduino-${_arduino}"
  58.  
  59.   mkdir -p "${pkgdir}/usr/bin"
  60.   mkdir -p "${pkgdir}/usr/share/"{doc,applications,icons/hicolor,mime/packages,licenses/teensyduino}
  61.   mkdir -p "${pkgdir}/usr/lib/udev/rules.d"
  62.  
  63.   # copy the whole SDK to /usr/share/arduino/
  64.   cp -a . "${pkgdir}/usr/share/arduino"
  65.  
  66.   # use system's RXTX library
  67.   ln -sf /usr/lib/librxtxSerial.so "${pkgdir}/usr/share/arduino/lib/librxtxSerial.so"
  68.   ln -sf /usr/lib/librxtxSerial.so "${pkgdir}/usr/share/arduino/lib/librxtxSerial64.so"
  69.   ln -sf /usr/share/java/rxtx/RXTXcomm.jar "${pkgdir}/usr/share/arduino/lib/RXTXcomm.jar"
  70.  
  71.   # we don't need these sources
  72.   rm -rf "${pkgdir}/usr/share/arduino/src"
  73.  
  74.   # at least support the FHS a little bit
  75.   ln -s /usr/share/arduino/arduino "${pkgdir}/usr/bin/arduino"
  76.   ln -s /usr/share/arduino/reference "${pkgdir}/usr/share/doc/arduino"
  77.  
  78.   # fix avrdude
  79.   rm -f "${pkgdir}/usr/share/arduino/hardware/tools/avr/bin/avrdude"{,_bin}
  80.   ln -s /usr/bin/avrdude "${pkgdir}/usr/share/arduino/hardware/tools/avr/bin/avrdude"
  81.  
  82.   # desktop icon
  83.   cp -a lib/icons/* "${pkgdir}/usr/share/icons/hicolor"
  84.   rm -rf "${pkgdir}/usr/share/arduino/lib/icons"
  85.   ln -s /usr/share/icons/hicolor "${pkgdir}/usr/share/arduino/lib/icons"
  86.  
  87.   # desktop and mimetype files
  88.   sed "s,<BINARY_LOCATION>,arduino %U,g;s,<ICON_NAME>,arduino,g" lib/desktop.template > "${pkgdir}/usr/share/applications/arduino.desktop"
  89.   install -m644 "${srcdir}/arduino.xml" "${pkgdir}/usr/share/mime/packages/"
  90.  
  91.   # install custom PJRC license
  92.   install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/teensyduino/"
  93.  
  94.   # install teensy loader files
  95.   install -m644 "${srcdir}/49-teensy.rules" "${pkgdir}/usr/lib/udev/rules.d"
  96.   ln -s /usr/share/arduino/hardware/tools/teensy "${pkgdir}/usr/bin/teensy-loader"
  97.   install -m644 "${srcdir}/teensy-loader.desktop" "${pkgdir}/usr/share/applications/"
  98.  
  99.   # install command-line teensy loader
  100.   install -m755 "${srcdir}/teensy_loader_cli/teensy_loader_cli" "${pkgdir}/usr/bin/teensy-loader-cli"
  101. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top