From 55ce2f9ba6fa030cea9008f93f5fc715ee027615 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 26 Sep 2012 16:51:52 -0400 Subject: add java/arduino --- java/arduino/PKGBUILD | 88 +++++++++++++++++++++++++++++++++++++++++++ java/arduino/arduino.desktop | 9 +++++ java/arduino/arduino.install | 10 +++++ java/arduino/arduino.png | Bin 0 -> 47981 bytes 4 files changed, 107 insertions(+) create mode 100644 java/arduino/PKGBUILD create mode 100644 java/arduino/arduino.desktop create mode 100644 java/arduino/arduino.install create mode 100644 java/arduino/arduino.png diff --git a/java/arduino/PKGBUILD b/java/arduino/PKGBUILD new file mode 100644 index 000000000..b21db4fbf --- /dev/null +++ b/java/arduino/PKGBUILD @@ -0,0 +1,88 @@ +# Maintainer: PyroPeter + +pkgname=arduino +pkgver=1.0.1 +pkgrel=1 +pkgdesc="Arduino SDK" +arch=('i686' 'x86_64') +url="http://arduino.cc/en/Main/Software" +options=(!strip) +license=('GPL') + +makedependa=(java-environment avr-gcc avr-libc make apache-ant) +depends=('avr-gcc>=4.3.2' 'avr-libc' 'libusb-compat' 'java-runtime' 'avrdude' + 'java-rxtx' 'antlr2' 'eclipse-ecj' 'jna') +#conflicts=('avr-gcc>=4.4') +install="arduino.install" +source=("http://arduino.googlecode.com/files/arduino-$pkgver-src.tar.gz" + 'arduino.png' + 'arduino.desktop') + +unset _JAVA_OPTIONS +. /etc/profile.d/jdk.sh + +build() { + cd "$srcdir" + mkdir empty.d + cd empty.d + bsdtar cjf ../empty.tar.bz2 . + cd .. + rmdir empty.d + + cd "$srcdir/arduino-$pkgver" + find . -name '*.jar' -delete + find . -name '*.swp' -delete + find . -name '*.so' -delete + rm -rf build/linux/dist/*/* + + #ln -s /.../RXTXcomm.jar app/lib # already on the classpath + ln -s /usr/share/java/antlr2.jar app/lib/antlr.jar + #ln -s /.../apple.jar app/lib # only used on Mac OS + ln -s /usr/share/java/ecj.jar app/lib + ln -s /usr/share/java/jna.jar app/lib + ln -s /usr/bin/avrdude build/linux/dist/tools + + ln -s "$srcdir/empty.tar.bz2" build/linux/avr_tools_linux32.tar.bz2 + ln -s "$srcdir/empty.tar.bz2" build/linux/avr_tools_linux64.tar.bz2 + + for d in methods preproc; do + cd "$srcdir/arduino-$pkgver/core/$d" + ant + done + + cd "$srcdir/arduino-$pkgver/build" + + log=`mktemp` + ant 2>&1|tee "$log" + if egrep -q 'Error|FAILED' "$log"; then + rm "$log" + false + else + rm "$log" + fi +} + +package() { + cd "$srcdir/arduino-$pkgver/build/linux/work" + + # arduino excutable should accept arguments + sed -i 's|^java .* processing.app.Base$|\0 "$@"|' arduino + sed -i 's|^APPDIR=.*|APPDIR=/usr/share/arduino|' arduino + + mkdir -p "$pkgdir"/usr/{bin,share/{doc,applications,pixmaps}} + + # copy the whole SDK to /usr/share/arduino/ + cp -r . "$pkgdir/usr/share/arduino" + + # at least support the FHS a little bit: + install -m755 "arduino" "$pkgdir/usr/bin/arduino" + ln -s /usr/share/arduino/reference "$pkgdir/usr/share/doc/arduino" + + # desktop icon + install -m644 "$srcdir/arduino.desktop" "$pkgdir/usr/share/applications/" + install -m644 "$srcdir/arduino.png" "$pkgdir/usr/share/pixmaps/" +} + +md5sums=('03263613f4be4f865989244420be04fa' + '9e36d33891d5e68d38ec55d1494499a5' + 'eebc4d6495864bea99ad057af801afb9') diff --git a/java/arduino/arduino.desktop b/java/arduino/arduino.desktop new file mode 100644 index 000000000..8469724ea --- /dev/null +++ b/java/arduino/arduino.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Arduino +GenericName=Arduino IDE +Comment=The open-source Arduino environment +Exec=arduino +Icon=arduino +Type=Application +Terminal=false +Categories=Development;IDE;Qt;KDE;;Application; diff --git a/java/arduino/arduino.install b/java/arduino/arduino.install new file mode 100644 index 000000000..35d283fab --- /dev/null +++ b/java/arduino/arduino.install @@ -0,0 +1,10 @@ +post_install() { + xdg-icon-resource install --size 256 --novendor /usr/share/pixmaps/arduino.png + echo "Don't forget to add yourself to the uucp group: gpasswd -a uucp" +} + +pre_remove() { + xdg-icon-resource uninstall --size 256 arduino +} + +# vim:set ts=2 sw=2 et: diff --git a/java/arduino/arduino.png b/java/arduino/arduino.png new file mode 100644 index 000000000..ea3ac81b4 Binary files /dev/null and b/java/arduino/arduino.png differ -- cgit v1.2.3