update to 1.0.1 [release 1.0.1-1mamba;Wed May 23 2012]

This commit is contained in:
Stefano Cotta Ramusino 2024-01-05 20:32:10 +01:00
parent c5a4cc3a7e
commit 6e42f36a8c
5 changed files with 226 additions and 0 deletions

View File

@ -1,2 +1,5 @@
# arduino
The open-source Arduino environment makes it easy to write code and upload it to the Arduino i/o board.
The environment is written in Java and based on Processing, avr-gcc, and other open source software.

33
arduino-1.0-etc.patch Normal file
View File

@ -0,0 +1,33 @@
diff --git a/build/linux/arduino.1 b/build/linux/arduino.1
new file mode 100644
index 0000000..129daad
--- /dev/null
+++ b/build/linux/arduino.1
@@ -0,0 +1,13 @@
+.TH ARDUINO 1 "30 September 2010"
+.SH NAME
+arduino \- An IDE for Arduino-compatible electronics prototyping platforms
+.SH SYNOPSIS
+arduino
+.SH DESCRIPTION
+The Arduino development environment consists of a text editor, example
+code, and tools for compiling and uploading code to Arduino and
+compatible microcontroller boards.
+.SH SEE ALSO
+/usr/share/arduino/reference/index.html, http://arduino.cc/
+.SH AUTHOR
+Peter Oliver <arduino@mavit.org.uk>
diff --git a/build/linux/arduino.desktop b/build/linux/arduino.desktop
new file mode 100644
index 0000000..45ceaf9
--- /dev/null
+++ b/build/linux/arduino.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Name=Arduino
+Comment=An IDE for Arduino-compatible electronics prototyping platforms
+Exec=arduino
+Icon=arduino
+Terminal=false
+Categories=Development;IDE;Electronics;

View File

@ -0,0 +1,45 @@
diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java
index b4fedbc..a002e39 100644
--- a/app/src/processing/app/Editor.java
+++ b/app/src/processing/app/Editor.java
@@ -98,6 +98,7 @@ public class Editor extends JFrame implements RunnerListener {
static SerialMenuListener serialMenuListener;
static SerialMonitor serialMonitor;
+ boolean serialScanned;
EditorHeader header;
EditorStatus status;
@@ -940,6 +941,32 @@ public class Editor extends JFrame implements RunnerListener {
serialMenu.removeAll();
boolean empty = true;
+ if ( System.getProperty("os.name").equals("Linux")
+ && ( serialScanned
+ || System.getProperty("gnu.io.rxtx.SerialPorts") == null ) ) {
+ String[] prefixes = {
+ "ttyS", "ttyUSB", "ttyACM"
+ };
+ String SerialPorts = null;
+ File devicesDir = new File("/dev/");
+ for ( String device : devicesDir.list() ) {
+ for ( String prefix : prefixes ) {
+ if ( device.startsWith(prefix) ) {
+ if ( SerialPorts == null ) {
+ SerialPorts = "/dev/" + device;
+ }
+ else {
+ SerialPorts += ":/dev/" + device;
+ }
+ }
+ }
+ }
+ if ( SerialPorts != null ) {
+ System.setProperty("gnu.io.rxtx.SerialPorts", SerialPorts);
+ serialScanned = true;
+ }
+ }
+
try
{
for (Enumeration enumeration = CommPortIdentifier.getPortIdentifiers(); enumeration.hasMoreElements();)

View File

@ -0,0 +1,38 @@
--- arduino-1.0.1/build/linux/dist/arduino.orig 2011-03-11 23:50:11.000000000 +0100
+++ arduino-1.0.1/build/linux/dist/arduino 2012-05-23 17:50:05.000000000 +0200
@@ -1,22 +1,16 @@
-#!/bin/sh
-
-APPDIR="$(dirname -- $(readlink -f -- "${0}") )"
-
-cd $APPDIR
-
-for LIB in \
- java/lib/rt.jar \
- java/lib/tools.jar \
- lib/*.jar \
- ;
-do
- CLASSPATH="${CLASSPATH}:${LIB}"
-done
-export CLASSPATH
+#!/bin/bash
-LD_LIBRARY_PATH=`pwd`/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
-export LD_LIBRARY_PATH
-export PATH="${APPDIR}/java/bin:${PATH}"
+. /usr/share/java-utils/java-functions
-java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel processing.app.Base
+MAIN_CLASS=processing.app.Base
+
+set_classpath ecj jna RXTXcomm
+for lib in /usr/share/arduino/*.jar; do
+ CLASSPATH="$CLASSPATH:$lib"
+done
+
+set_flags -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel
+
+cd /usr/share/arduino
+run "$@"

107
arduino.spec Normal file
View File

@ -0,0 +1,107 @@
%define longversion %(echo 0%version | tr -d .)
Name: arduino
Version: 1.0.1
Release: 1mamba
Summary: The open-source Arduino environment
Group: Graphical Desktop/Applications/Development
Vendor: openmamba
Distribution: openmamba
Packager: Stefano Cotta Ramusino <stefano.cotta@openmamba.org>
URL: http://www.arduino.cc/en/Main/software
Source: http://arduino.googlecode.com/files/arduino-%{version}-src.tar.gz
Source1: arduino-1.0.1-icons.tar.xz
Patch0: arduino-1.0.1-script.patch
# http://github.com/arduino/Arduino/pull/5
Patch1: arduino-1.0-use_system_rxtx.patch
# http://github.com/arduino/Arduino/pull/6:
Patch2: arduino-1.0-etc.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: ldconfig
## AUTOBUILDREQ-END
BuildRequires: apache-ant
BuildRequires: jpackage-utils
Requires: cross-avr-gcc
Requires: avr-libc
Requires: avrdude
Requires: java-rxtx
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
The open-source Arduino environment makes it easy to write code and upload it to the Arduino i/o board.
The environment is written in Java and based on Processing, avr-gcc, and other open source software.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
(
mkdir -p build/linux/icons
cd build/linux/icons
tar xf %{SOURCE1}
)
find -name '*.class' -exec rm -f '{}' \;
find -name '*.jar' -exec rm -f '{}' \;
build-jar-repository -p -s app/lib/ ecj jna RXTXcomm
%build
(cd core/methods; ant)
(cd core; ant)
(cd build; ant dist < /dev/null; tar -xf linux/arduino-%{longversion}-linux.tgz)
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
cd build/arduino-%{longversion}
install -d %{buildroot}%{_bindir}
cp -a arduino %{buildroot}%{_bindir}/
install -d %{buildroot}%{_datadir}/arduino
cp -a hardware lib libraries examples %{buildroot}%{_datadir}/arduino/
rm %{buildroot}%{_datadir}/arduino/lib/*.jar
rm -r %{buildroot}%{_datadir}/arduino/hardware/tools
mkdir -p %{buildroot}%{_defaultdocdir}/arduino-%{version}
cp -a reference %{buildroot}%{_defaultdocdir}/arduino-%{version}/
ln -s %{_defaultdocdir}/arduino-%{version}/reference %{buildroot}%{_datadir}/arduino/reference
# Requested upstream in http://github.com/arduino/Arduino/pull/4:
find %{buildroot} -type f -iname '*.jpg' -or -iname '*.java' -or -iname '*.pde' -or -iname '*.h' -or -iname '*.cpp' -or -iname '*.c' -or -iname '*.txt' -or -iname 'makefile' -or -iname 'key*.txt' -or -iname 'pref*.txt' | xargs chmod -x;
cp -a lib/core.jar lib/pde.jar %{buildroot}%{_datadir}/%{name}/
install -D -m 0644 ../linux/arduino.1 \
%{buildroot}%{_mandir}/man1/arduino.1
install -D -m 0644 ../linux/arduino.desktop \
%{buildroot}%{_datadir}/applications/arduino.desktop
for dir in ../linux/icons/*; do
size=`basename $dir`
install -D -m 0644 $dir/apps/arduino.png \
%{buildroot}%{_datadir}/icons/hicolor/$size/apps/arduino.png
done
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_bindir}/%{name}
%{_datadir}/%{name}
%{_datadir}/applications/*
%{_datadir}/icons/hicolor/*/apps/*.png
%{_mandir}/man1/arduino.*
%doc %{_defaultdocdir}/arduino-%{version}/reference
%changelog
* Wed May 23 2012 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 1.0.1-1mamba
- update to 1.0.1
* Fri Feb 03 2012 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 1.0-1mamba
- package created by autospec