lfarkas pushed to rxtx (f20). "add arduino support"
notifications at fedoraproject.org
notifications at fedoraproject.org
Mon May 4 13:53:43 UTC 2015
>From 64d52c05f1081ce0147eac44f15e59544cf3de6f Mon Sep 17 00:00:00 2001
From: Levente Farkas <lfarkas at lfarkas.org>
Date: Tue, 10 Mar 2015 15:25:51 +0100
Subject: add arduino support
diff --git a/.gitignore b/.gitignore
index 3c849ec..9f32704 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
rxtx-20100211.tar.bz2
+/README.fedora
+/rxtx-2.2-Add-Arduino-driver-ttyACM-rxtxcomm-as-device.patch
diff --git a/README.fedora b/README.fedora
new file mode 100644
index 0000000..0f5fc01
--- /dev/null
+++ b/README.fedora
@@ -0,0 +1,22 @@
+rxtx Fedora README
+==================
+
+The Fedora package supports maven metadata since 2.2-11
+
+Although most devices will be detected using the standard code, some
+lesser used devices might slip through the net. In order to support
+such devices, the fedora package also scans for /dev/rxtxcomm* devices.
+No driver uses these names, but they can be used to create udev links
+for any device not othwerwise supported.
+
+The list of supported devices at the time of writing (from
+src/org/gnu/io/RXTXCommDriver.java):
+
+ "ttyS", // linux Serial Ports
+ "ttySA", // for the IPAQs
+ "ttyUSB", // for USB frobs
+ "ttyACM", // Arduino driver
+ "rxtxcomm", // Generic udev link target
+ "rfcomm", // bluetooth serial device
+ "ttyircomm", // linux IrCommdevices (IrDA serial emu)
+
diff --git a/rxtx-2.2-Add-Arduino-driver-ttyACM-rxtxcomm-as-device.patch b/rxtx-2.2-Add-Arduino-driver-ttyACM-rxtxcomm-as-device.patch
new file mode 100644
index 0000000..38b1b6d
--- /dev/null
+++ b/rxtx-2.2-Add-Arduino-driver-ttyACM-rxtxcomm-as-device.patch
@@ -0,0 +1,39 @@
+From 850683db3beb92309b29f2afc1d3769abc7ac918 Mon Sep 17 00:00:00 2001
+From: Alec Leamas <leamas.alec at gmail.com>
+Date: Wed, 25 Feb 2015 13:52:06 +0100
+Subject: [PATCH] Add Arduino driver ttyACM + generic rxtxcomm as device
+ candidates.
+
+The Arduino ttyACM is documented as a possible device in the source.
+Without the patch, rxtx does not work with Arduino devices
+
+The source contains a "Linux-alltargets" configuration target which
+contains this and some other less used devices. It could be argued
+that this could be used nowadays, since the original reason not to use
+it was the very large number of /dev/* nodes before udev reduced this
+to something more sane. However, the status of this code is generally
+questionable, at least some device names are probably out of date.
+
+Instead the patch also adds a /dev/rxtxcomm* device. There is no driver
+using this, but it can be used as a udev link for any device not
+otherwise supported.
+---
+ src/gnu/io/RXTXCommDriver.java | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/gnu/io/RXTXCommDriver.java b/src/gnu/io/RXTXCommDriver.java
+index 33c0882..23b274a 100644
+--- a/src/gnu/io/RXTXCommDriver.java
++++ b/src/gnu/io/RXTXCommDriver.java
+@@ -577,6 +577,8 @@ public class RXTXCommDriver implements CommDriver
+ "ttyS", // linux Serial Ports
+ "ttySA", // for the IPAQs
+ "ttyUSB", // for USB frobs
++ "ttyACM", // Arduino driver
++ "rxtxcomm", // Generic udev link target
+ "rfcomm", // bluetooth serial device
+ "ttyircomm", // linux IrCommdevices (IrDA serial emu)
+ };
+--
+2.1.0
+
diff --git a/rxtx.spec b/rxtx.spec
index 61a7b68..0294342 100644
--- a/rxtx.spec
+++ b/rxtx.spec
@@ -4,7 +4,7 @@
%global upver 2.2
%global uprel 20100211
-%global rel 0.11
+%global rel 0.12
#global jni %{_jnidir}
%global jni %{_libdir}/%{name}
@@ -22,10 +22,12 @@ URL: http://rxtx.qbang.org/
# tar cjvf rxtx-%{uprel}.tar.bz2 --exclude CVS --exclude .cvsignore rxtx-%{uprel}
Source: %{name}-%{uprel}.tar.bz2
#Source: http://rxtx.qbang.org/pub/rxtx/%{name}-%{upver}-%{uprel}.tgz
+Source1: README.fedora
Patch1: rxtx-2.2-loadlibrary.patch
Patch2: rxtx-2.2-no-io.h.patch
Patch3: rxtx-2.2-fhs_lock.patch
Patch4: rxtx-2.2-lock.patch
+Patch5: rxtx-2.2-Add-Arduino-driver-ttyACM-rxtxcomm-as-device.patch
#BuildRequires: java-devel >= 1:1.6.0
BuildRequires: java-devel
@@ -34,7 +36,7 @@ BuildRequires: libtool automake
BuildRequires: ant >= 1.7.0
BuildRequires: ant-junit >= 1.7.0
BuildRequires: junit
-BuildRequires: maven-local
+BuildRequires: maven-local
#Requires: java >= 1:1.6.0
Requires: java-headless
Requires: jpackage-utils
@@ -52,10 +54,12 @@ sed -e 's|@JNIPATH@|%{jni}|' %{PATCH1} | patch -s -b --suffix .p1 -p1
%patch3 -p1
%if 0%{?fedora} > 13 || 0%{?rhel} > 6
%patch4 -p1
+%patch5 -p1
%endif
# remove prebuild binaries
find . -name '*.jar' -exec rm {} \;
find . -name '*.hqx' -exec rm {} \;
+cp -a %{SOURCE1} .
%build
export JAVA_HOME=%{java_home}
@@ -75,18 +79,19 @@ find %{buildroot} -name '*.la' -exec rm {} \;
%mvn_file org.rxtx:rxtx:%{version} RXTXcomm
%mvn_install
rm -f %{buildroot}%{_datadir}/java/RXTXcomm.jar
-ln -s %{_jnidir}/RXTXcomm.jar \
- %{buildroot}%{_datadir}/java/RXTXcomm.jar
-
+ln -s %{_jnidir}/RXTXcomm.jar %{buildroot}%{_datadir}/java/RXTXcomm.jar
%files
-%doc AUTHORS COPYING ChangeLog INSTALL README TODO
+%doc AUTHORS COPYING ChangeLog INSTALL README TODO README.fedora
%{_javadir}/*
%{_jnidir}/*
%{jni}
%attr(644, root, root) %{_datadir}/maven-metadata/%{name}.xml
%changelog
+* Tue Mar 10 2015 Alec Leamas <leamas.alec at gmail.com> - 2.2-0.12.20100211
+- Add Arduino ttyACM + rxtxcomm devices patch
+
* Thu Feb 26 2015 Alec Leamas <leamas.alec at gmail.com> - 2.2-0.11.20100211
- Use mvn_artifact et. al. instead to provide maven metadata.
- Fix packaging bug with jni-related jar in /usr/share/java.
@@ -131,7 +136,7 @@ ln -s %{_jnidir}/RXTXcomm.jar \
- fix doc #722353
* Thu Mar 17 2011 Levente Farkas <lfarkas at lfarkas.org> - 2.2-0.4.20100211
-- fix fhs_lock #666761
+- fix fhs_lock #666761
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.2-0.3.20100211.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
diff --git a/sources b/sources
index 540d3ca..63aab71 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
-3cc2b3b6be0652c54488863e07b5f4bf rxtx-20100211.tar.bz2
+17e76367ca1e5f9ea976c5364d906ac5 README.fedora
+fd5a61fbf03c66624037e81925f5a59b rxtx-2.2-Add-Arduino-driver-ttyACM-rxtxcomm-as-device.patch
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/rxtx.git/commit/?h=f20&id=64d52c05f1081ce0147eac44f15e59544cf3de6f
More information about the scm-commits
mailing list