talimat 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Description: Arduino prototiplendirme kartı için geliştirici kiti (SDK).
  2. # URL: https://github.com/arduino/Arduino
  3. # Packager: milisarge
  4. # Depends on : gtk2 desktop-file-utils shared-mime-info openjdk avrdude apache-ant unzip
  5. name=arduino
  6. version=1.6.11
  7. release=1
  8. source=(https://github.com/arduino/Arduino/archive/$version.tar.gz
  9. arduino.sh)
  10. build() {
  11. cd "Arduino-${version}/build"
  12. export PATH=/opt/OpenJDK-8u60-bin/jre/bin/:$PATH
  13. ant clean build
  14. cd ${SRC}/"Arduino-${version}/build/linux/work"
  15. # Create directories
  16. install -dm755 "${PKG}/usr/share/"{doc,icons/hicolor,applications,mime/packages}
  17. # Copy the whole SDK
  18. cp -a . "${PKG}/usr/share/arduino"
  19. # Create wrapper for java8 + buider and documentation symlink
  20. install -Dm755 "${SRC}/arduino.sh" "${PKG}/usr/bin/arduino"
  21. ln -s /usr/share/arduino/arduino-builder "${PKG}/usr/bin/arduino-builder"
  22. ln -s /usr/share/arduino/reference "${PKG}/usr/share/doc/arduino"
  23. # Fix avrdude (see https://github.com/arduino/Arduino/issues/5094)
  24. rm -f "${PKG}/usr/share/arduino/hardware/tools/avr/bin/avrdude"{,_bin}
  25. ln -s /usr/bin/avrdude "${PKG}/usr/share/arduino/hardware/tools/avr/bin/avrdude"
  26. # Install desktop icons (keep a symlink for the arduino binary)
  27. cp -a lib/icons/* "${PKG}/usr/share/icons/hicolor"
  28. rm -rf "${PKG}/usr/share/arduino/lib/icons"
  29. ln -s /usr/share/icons/hicolor "${PKG}/usr/share/arduino/lib/icons"
  30. # Create desktop file using existing template
  31. sed "s,<BINARY_LOCATION>,arduino %U,g;s,<ICON_NAME>,arduino,g" "lib/desktop.template" \
  32. > "${PKG}/usr/share/applications/arduino.desktop"
  33. # Install Arduino mime type
  34. ln -s /usr/share/arduino/lib/arduino-arduinoide.xml "${PKG}/usr/share/mime/packages/arduino.xml"
  35. }