From 3f04e87f092cf69f7630f08b384cc8af095d2c4c Mon Sep 17 00:00:00 2001 From: milisman Date: Tue, 13 Sep 2016 05:12:18 +0300 Subject: [PATCH] arduino.paketlendi --- talimatname/genel/arduino/arduino.sh | 2 ++ talimatname/genel/arduino/talimat | 44 ++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 talimatname/genel/arduino/arduino.sh create mode 100644 talimatname/genel/arduino/talimat diff --git a/talimatname/genel/arduino/arduino.sh b/talimatname/genel/arduino/arduino.sh new file mode 100644 index 000000000..e85efdec0 --- /dev/null +++ b/talimatname/genel/arduino/arduino.sh @@ -0,0 +1,2 @@ +export PATH=/opt/OpenJDK-8u60-bin/jre/bin/:$PATH +exec /usr/share/arduino/arduino "$@" diff --git a/talimatname/genel/arduino/talimat b/talimatname/genel/arduino/talimat new file mode 100644 index 000000000..ad3763007 --- /dev/null +++ b/talimatname/genel/arduino/talimat @@ -0,0 +1,44 @@ +# Description: Arduino prototyping platform SDK +# URL: https://github.com/arduino/Arduino +# Packager: milisarge +# Depends on : gtk2 desktop-file-utils shared-mime-info openjdk avrdude apache-ant unzip + +name=arduino +version=1.6.11 +release=1 +source=(https://github.com/arduino/Arduino/archive/$version.tar.gz + arduino.sh) +build() { +cd "Arduino-${version}/build" + export PATH=/opt/OpenJDK-8u60-bin/jre/bin/:$PATH + ant clean build + + cd ${SRC}/"Arduino-${version}/build/linux/work" + + # Create directories + install -dm755 "${PKG}/usr/share/"{doc,icons/hicolor,applications,mime/packages} + + # Copy the whole SDK + cp -a . "${PKG}/usr/share/arduino" + + # Create wrapper for java8 + buider and documentation symlink + install -Dm755 "${SRC}/arduino.sh" "${PKG}/usr/bin/arduino" + ln -s /usr/share/arduino/arduino-builder "${PKG}/usr/bin/arduino-builder" + ln -s /usr/share/arduino/reference "${PKG}/usr/share/doc/arduino" + + # Fix avrdude (see https://github.com/arduino/Arduino/issues/5094) + rm -f "${PKG}/usr/share/arduino/hardware/tools/avr/bin/avrdude"{,_bin} + ln -s /usr/bin/avrdude "${PKG}/usr/share/arduino/hardware/tools/avr/bin/avrdude" + + # Install desktop icons (keep a symlink for the arduino binary) + cp -a lib/icons/* "${PKG}/usr/share/icons/hicolor" + rm -rf "${PKG}/usr/share/arduino/lib/icons" + ln -s /usr/share/icons/hicolor "${PKG}/usr/share/arduino/lib/icons" + + # Create desktop file using existing template + sed "s,,arduino %U,g;s,,arduino,g" "lib/desktop.template" \ + > "${PKG}/usr/share/applications/arduino.desktop" + + # Install Arduino mime type + ln -s /usr/share/arduino/lib/arduino-arduinoide.xml "${PKG}/usr/share/mime/packages/arduino.xml" +}