talimat 1.7 KB

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