SHARE
TWEET

teensyduino 1.43 PKGBUILD

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