diff options
author | Niels Martignène | 2015-06-10 10:08:31 +0200 |
---|---|---|
committer | Niels Martignène | 2015-06-10 10:08:31 +0200 |
commit | 5f96181cb8054a19fb7b476440ab293db0a4ea5b (patch) | |
tree | 51f927584eae0ba0bd9ed754d5cbf7bc51ec1fc1 | |
download | aur-5f96181cb8054a19fb7b476440ab293db0a4ea5b.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 54 | ||||
-rw-r--r-- | LICENSE | 29 | ||||
-rw-r--r-- | PKGBUILD | 111 | ||||
-rw-r--r-- | arduino.desktop | 11 | ||||
-rw-r--r-- | arduino.xml | 44 | ||||
-rw-r--r-- | teensy-loader.desktop | 9 | ||||
-rw-r--r-- | teensyduino.install | 15 | ||||
-rwxr-xr-x | teensyduino.sh | 27 |
8 files changed, 300 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b7e217d0ba4f --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,54 @@ +pkgbase = teensyduino + pkgdesc = Arduino SDK with Teensyduino + pkgver = 1.23 + pkgrel = 2 + url = http://www.pjrc.com/teensy/teensyduino.html + install = teensyduino.install + arch = i686 + arch = x86_64 + license = GPL + license = LGPL + license = custom + makedepends = xorg-server-xvfb + makedepends = libxft + makedepends = xdotool + makedepends = icoutils + depends = gtk2 + depends = libusb-compat + depends = libusb + depends = java-runtime + depends = libpng12 + depends = libsm + depends = desktop-file-utils + depends = libtinfo + depends = giflib + provides = arduino + conflicts = arduino + conflicts = teensy-loader-cli + options = !strip + options = staticlibs + source = arduino.desktop + source = arduino.xml + source = teensyduino.sh + source = teensy-loader.desktop + source = git+https://github.com/PaulStoffregen/teensy_loader_cli.git#commit=001da416bc362ff24485ff97e3a729bd921afe98 + source = http://www.pjrc.com/teensy/49-teensy.rules + source = LICENSE + sha256sums = d817829bb2830cb690ed63f14d8a990bb513bef4a4ebc6227a82abdfc8bcd35d + sha256sums = 473b82156505e9bd903e4d8484e8d183f2e3bf3c1f7e29940b815929ae597b68 + sha256sums = bdd3da81cad5429e1d59c7950f40e75a96d2dd6cab07c2ffb77153e6e860f4b3 + sha256sums = 270b55353eb438d3790c7245e5ae16ff8bac9f98cfe927d6c9f2146a34499323 + sha256sums = SKIP + sha256sums = fa7eff0e0f1e8230941c3b016c40617887f52f1991db655a498309824291ca54 + sha256sums = 25980feb5927b8bea8b8e999f5002e110825b1bc3d546fa902c2db5c824d33f3 + source_i686 = http://downloads.arduino.cc/arduino-1.6.4-linux32.tar.xz + source_i686 = http://www.pjrc.com/teensy/td_123/teensyduino.32bit + sha256sums_i686 = c30e6d681bb8d70c468b2110919ee99689668c8ca3af83a5bd0005934c761466 + sha256sums_i686 = 204b255e7802cd6db23c81ffe35c498bd6f6b1acd7570e8107653b8c65c0079d + source_x86_64 = http://downloads.arduino.cc/arduino-1.6.4-linux64.tar.xz + source_x86_64 = http://www.pjrc.com/teensy/td_123/teensyduino.64bit + sha256sums_x86_64 = eb9f2dae8b2cd131e9744eb9385af7a765888cb17916e0163ce171124546495c + sha256sums_x86_64 = 6d28abbd22c03a125fae9082de6fd701879df093b305c205d8321aaa305d7836 + +pkgname = teensyduino + diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000000..3fd94a138372 --- /dev/null +++ b/LICENSE @@ -0,0 +1,29 @@ +Teensyduino Core Library +http://www.pjrc.com/teensy/ +Copyright (c) 2013 PJRC.COM, LLC. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +1. The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +2. If the Software is incorporated into a build system that allows +selection among a list of target devices, then similar target +devices manufactured by PJRC.COM must be included in the list of +target devices and selectable in the same manner. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f6e367a3b80e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,111 @@ +# Maintainer: Niels Martignène <niels.martignene@gmail.com> +# Contributor: PyroPeter <googlemail.com@abi1789> +# Contributor: darkapex <me@jailuthra.in> +# Contributor: tty0 <vt.tty0[d0t]gmail.com> + +pkgname=teensyduino +pkgver=1.23 +_arduino=1.6.4 +_loader=2.1 +pkgrel=2 +pkgdesc="Arduino SDK with Teensyduino" +arch=('i686' 'x86_64') +url="http://www.pjrc.com/teensy/teensyduino.html" +options=(!strip staticlibs) +license=('GPL' 'LGPL' 'custom') +depends=('gtk2' 'libusb-compat' 'libusb' 'java-runtime' 'libpng12' 'libsm' + 'desktop-file-utils' 'libtinfo' 'giflib') +makedepends=('xorg-server-xvfb' 'libxft' 'xdotool' 'icoutils') +provides=('arduino') +conflicts=('arduino' 'teensy-loader-cli') +install="teensyduino.install" +source=('arduino.desktop' + 'arduino.xml' + 'teensyduino.sh' + 'teensy-loader.desktop' + "git+https://github.com/PaulStoffregen/teensy_loader_cli.git#commit=001da416bc362ff24485ff97e3a729bd921afe98" + "http://www.pjrc.com/teensy/49-teensy.rules" + 'LICENSE') +source_i686+=("http://downloads.arduino.cc/arduino-${_arduino}-linux32.tar.xz" + "http://www.pjrc.com/teensy/td_${pkgver//./}/teensyduino.32bit") +source_x86_64+=("http://downloads.arduino.cc/arduino-${_arduino}-linux64.tar.xz" + "http://www.pjrc.com/teensy/td_${pkgver//./}/teensyduino.64bit") +sha256sums=('d817829bb2830cb690ed63f14d8a990bb513bef4a4ebc6227a82abdfc8bcd35d' + '473b82156505e9bd903e4d8484e8d183f2e3bf3c1f7e29940b815929ae597b68' + 'bdd3da81cad5429e1d59c7950f40e75a96d2dd6cab07c2ffb77153e6e860f4b3' + '270b55353eb438d3790c7245e5ae16ff8bac9f98cfe927d6c9f2146a34499323' + 'SKIP' + 'fa7eff0e0f1e8230941c3b016c40617887f52f1991db655a498309824291ca54' + '25980feb5927b8bea8b8e999f5002e110825b1bc3d546fa902c2db5c824d33f3') +sha256sums_i686=('c30e6d681bb8d70c468b2110919ee99689668c8ca3af83a5bd0005934c761466' + '204b255e7802cd6db23c81ffe35c498bd6f6b1acd7570e8107653b8c65c0079d') +sha256sums_x86_64=('eb9f2dae8b2cd131e9744eb9385af7a765888cb17916e0163ce171124546495c' + '6d28abbd22c03a125fae9082de6fd701879df093b305c205d8321aaa305d7836') + +if [ "$CARCH" == 'x86_64' ]; then + _bits=64 +elif [ "$CARCH" == 'i686' ]; then + _bits=32 +fi + +prepare() { + cd "arduino-${_arduino}" + + icotool -x -o .. lib/arduino_icon.ico +} + +build() { + msg2 "Running Teensyduino installer (takes around 60 seconds)" + + chmod +x "teensyduino.${_bits}bit" + xvfb-run ./teensyduino.sh "./teensyduino.${_bits}bit" "${srcdir}/arduino-${_arduino}" + + msg2 "Building Teensy Loader command line" + + cd teensy_loader_cli + make +} + +package() { + cd "arduino-${_arduino}" + + mkdir -p "${pkgdir}/usr/bin" + mkdir -p "${pkgdir}/usr/share/"{doc,applications,mime/packages,licenses/teensyduino} + mkdir -p "${pkgdir}/usr/lib/udev/rules.d" + + # copy the whole SDK to /usr/share/arduino/ + cp -a . "${pkgdir}/usr/share/arduino" + + # use system's RXTX library + ln -sf /usr/lib/librxtxSerial.so "${pkgdir}/usr/share/arduino/lib/librxtxSerial.so" + ln -sf /usr/lib/librxtxSerial.so "${pkgdir}/usr/share/arduino/lib/librxtxSerial64.so" + ln -sf /usr/share/java/rxtx/RXTXcomm.jar "${pkgdir}/usr/share/arduino/lib/RXTXcomm.jar" + + # we don't need these sources + rm -rf "${pkgdir}/usr/share/arduino/src" + + # at least support the FHS a little bit + ln -s /usr/share/arduino/arduino "${pkgdir}/usr/bin/arduino" + ln -s /usr/share/arduino/reference "${pkgdir}/usr/share/doc/arduino" + + # desktop icon + for size in 16 32 48 256; do + install -Dm644 ../arduino_icon_*_${size}x${size}x32.png \ + "${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/arduino.png" + done + + # desktop and mimetype files + install -m644 "${srcdir}/arduino.desktop" "${pkgdir}/usr/share/applications/" + install -m644 "${srcdir}/arduino.xml" "${pkgdir}/usr/share/mime/packages/" + + # install custom PJRC license + install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/teensyduino/" + + # install teensy loader files + install -m644 "${srcdir}/49-teensy.rules" "${pkgdir}/usr/lib/udev/rules.d" + ln -s /usr/share/arduino/hardware/tools/teensy "${pkgdir}/usr/bin/teensy-loader" + install -m644 "${srcdir}/teensy-loader.desktop" "${pkgdir}/usr/share/applications/" + + # install command-line teensy loader + install -m755 "${srcdir}/teensy_loader_cli/teensy_loader_cli" "${pkgdir}/usr/bin/teensy-loader-cli" +} diff --git a/arduino.desktop b/arduino.desktop new file mode 100644 index 000000000000..180dea615bf5 --- /dev/null +++ b/arduino.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=Arduino +GenericName=Arduino IDE +Comment=The open-source Arduino environment +TryExec=arduino +Exec=arduino %U +Icon=arduino +Type=Application +Terminal=false +MimeType=text/x-arduino; +Categories=Development; diff --git a/arduino.xml b/arduino.xml new file mode 100644 index 000000000000..166b5a245f30 --- /dev/null +++ b/arduino.xml @@ -0,0 +1,44 @@ +<?xml version='1.0' encoding='utf-8'?> +<!-- Copied from the Ubuntu package --> +<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> + <mime-type type="text/x-arduino"> + <comment>Arduino source code</comment> + <comment xml:lang="ara">شفرة مصدر Arduino</comment> + <comment xml:lang="be@latin">Kryničny kod Arduino</comment> + <comment xml:lang="bg">Изходен код на Arduino</comment> + <comment xml:lang="ca">codi font en Arduino</comment> + <comment xml:lang="da">Arduinokildekode</comment> + <comment xml:lang="de">Arduino-Quelltext</comment> + <comment xml:lang="el">πηγαίος κώδικας Arduino</comment> + <comment xml:lang="en_GB">Arduino source code</comment> + <comment xml:lang="eo">Arduino-fontkodo</comment> + <comment xml:lang="es">código fuente en Arduino</comment> + <comment xml:lang="eu">Arduino iturburu-kodea</comment> + <comment xml:lang="fi">Arduino-lähdekoodi</comment> + <comment xml:lang="fr">code source Arduino</comment> + <comment xml:lang="ga">cód foinseach Arduino</comment> + <comment xml:lang="hu">Arduino-forráskód</comment> + <comment xml:lang="id">Kode program Arduino</comment> + <comment xml:lang="it">Codice sorgente Arduino</comment> + <comment xml:lang="ja">Arduino ソースコード</comment> + <comment xml:lang="lt">Arduino pradinis kodas</comment> + <comment xml:lang="lv">Arduino pirmkods</comment> + <comment xml:lang="ms">Kod sumber Arduino</comment> + <comment xml:lang="nb">Arduino-kildekode</comment> + <comment xml:lang="nl">Arduino-broncode</comment> + <comment xml:lang="nn">Arduino-kjeldekode</comment> + <comment xml:lang="pl">Kod źródłowy Arduino</comment> + <comment xml:lang="pt">código fonte Arduino</comment> + <comment xml:lang="pt_BR">Código fonte Arduino</comment> + <comment xml:lang="ru">исходный код Arduino</comment> + <comment xml:lang="sq">Kod burues Arduino</comment> + <comment xml:lang="sv">Arduino-källkod</comment> + <comment xml:lang="uk">Вихідний код на мові Arduino</comment> + <comment xml:lang="vi">Mã nguồn Arduino</comment> + <comment xml:lang="zh_CN">Arduino 源代码</comment> + <comment xml:lang="zh_TW">Arduino 源代碼</comment> + <sub-class-of type="text/x-c++src"/> + <glob pattern="*.ino"/> + <glob pattern="*.pde"/> + </mime-type> +</mime-info> diff --git a/teensy-loader.desktop b/teensy-loader.desktop new file mode 100644 index 000000000000..82f6a4307334 --- /dev/null +++ b/teensy-loader.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Teensy Loader +GenericName=Teensy Loader +Comment=Teensy Loader GUI +Exec=teensy-loader +Icon=teensy +Type=Application +Terminal=false +Categories=Development; diff --git a/teensyduino.install b/teensyduino.install new file mode 100644 index 000000000000..b4c07efb79e5 --- /dev/null +++ b/teensyduino.install @@ -0,0 +1,15 @@ +post_upgrade() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + update-desktop-database -q + update-mime-database /usr/share/mime >/dev/null +} + +post_install() { + post_upgrade + + echo "Don't forget to add yourself to the uucp and lock groups: gpasswd -a <user> uucp && gpasswd -a <user> lock (execute as root)" +} + +post_remove() { + post_upgrade +} diff --git a/teensyduino.sh b/teensyduino.sh new file mode 100755 index 000000000000..ec7d98f6ad30 --- /dev/null +++ b/teensyduino.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +sleep 2 + +export HOME=$2 +$1 & + +sleep 5 +xdotool search --class "teensyduino" \ + windowfocus \ + key --delay 1000 space \ + key --delay 400 Tab \ + key --delay 400 Tab \ + key --delay 400 Tab \ + key --delay 400 Tab \ + key --delay 1000 space \ + key --delay 1000 space \ + key --delay 400 Tab \ + key --delay 400 Tab \ + key --delay 400 Tab \ + key --delay 400 Tab \ + key --delay 400 space \ + key --delay 400 Tab \ + key --delay 40000 space + +killall $(basename $1) >/dev/null || exit 1 +[ -d $2/hardware/teensy ] || exit 1 |