diff --git a/.cvsignore b/.cvsignore index e69de29..3d8b9ed 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +rxtx-2.1-7r2.zip diff --git a/import.log b/import.log new file mode 100644 index 0000000..4439f53 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +rxtx-2_1-0_2_7r2_fc9:HEAD:rxtx-2.1-0.2.7r2.fc9.src.rpm:1224531706 diff --git a/rxtx-2.1-configure.patch b/rxtx-2.1-configure.patch new file mode 100644 index 0000000..8c43124 --- /dev/null +++ b/rxtx-2.1-configure.patch @@ -0,0 +1,45 @@ +diff -up ./configure.in.p2 ./configure.in +--- ./configure.in.p2 2006-01-30 05:37:47.000000000 +0100 ++++ ./configure.in 2008-08-19 16:21:42.000000000 +0200 +@@ -458,12 +458,12 @@ fi + [ case $OS_NAME in + Linux) + LDFLAGS=$LDFLAGS" -lpthread" +- check_kernel_headers ++ #check_kernel_headers + check_java_headers + CFLAGS=$CFLAGS" -D__need_timespec" + case $JAVA_VERSION in + +- 1.2*|1.3*|1.4*|1.5*) ++ 1.2*|1.3*|1.4*|1.5*|1.6*) + #fix_parameters $JPATH/jre/lib/javax.comm.properties + CLASSPATH=".:\$(TOP):\$(TOP)/src:"`find $JPATH/ -name RXTXcomm.jar |head -n1` + JHOME=$JPATH"/jre/lib/ext" +@@ -533,7 +533,7 @@ Linux) + TARGETLIB="\$(target_triplet)/librxtxSerial.la \ + \$(target_triplet)/librxtxParallel.la" + case $JAVA_VERSION in +- 1.2*|1.3*|1.4*|1.5*) ++ 1.2*|1.3*|1.4*|1.5*|1.6*) + #fix_parameters $JPATH/jre/lib/javax.comm.properties + CLASSPATH=".:\$(TOP):\$(TOP)/src:"`find $JPATH/ -name RXTXcomm.jar |head -n1` + RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" +@@ -669,7 +669,7 @@ BeOS) + + WIN32) + case $JAVA_VERSION in +- 1.2*|1.3*|1.4*|1.5*) ++ 1.2*|1.3*|1.4*|1.5*|1.6*) + CLASSPATH=".:\$(TOP):\$(TOP)/src:`find $JPATH/ -name RXTXcomm.jar |head -n1`:$CLASSPATH" + JHOME=$JPATH"/jre/lib/ext" + ;; +@@ -721,7 +721,7 @@ Solaris*) + CLASSPATH=".:\$(TOP):\$(TOP)/src:\$(JPATH)/lib/classes.zip:\$(JPATH)/lib/RXTXcomm.jar:$CLASSPATH" + + case $JAVA_VERSION in +- 1.2*|1.3*|1.4*|1.5*) ++ 1.2*|1.3*|1.4*|1.5*|1.6*) + RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)" + ;; + 1.1*) diff --git a/rxtx-2.1-loadlibrary.patch b/rxtx-2.1-loadlibrary.patch new file mode 100644 index 0000000..7513b72 --- /dev/null +++ b/rxtx-2.1-loadlibrary.patch @@ -0,0 +1,88 @@ +--- ./src/I2C.java.lfarkas 2008-08-01 23:29:24.000000000 +0200 ++++ ./src/I2C.java 2008-08-01 23:29:59.000000000 +0200 +@@ -35,7 +35,7 @@ + + static + { +- System.loadLibrary( "rxtxI2C" ); ++ System.load("@JNIPATH@/" + System.mapLibraryName("rxtxI2C")); + Initialize(); + } + +--- ./src/RXTXPort.java.lfarkas 2008-08-01 23:30:53.000000000 +0200 ++++ ./src/RXTXPort.java 2008-08-01 23:31:16.000000000 +0200 +@@ -51,7 +51,7 @@ + + if(debug ) + z.reportln( "RXTXPort {}"); +- System.loadLibrary( "rxtxSerial" ); ++ System.load("@JNIPATH@/" + System.mapLibraryName("rxtxSerial")); + Initialize(); + } + +--- ./src/Raw.java.lfarkas 2008-08-01 23:26:50.000000000 +0200 ++++ ./src/Raw.java 2008-08-01 23:27:54.000000000 +0200 +@@ -32,7 +32,7 @@ + + static + { +- System.loadLibrary( "rxtxRaw" ); ++ System.load("@JNIPATH@/" + System.mapLibraryName("rxtxRaw")); + Initialize(); + } + +--- ./src/RXTXCommDriver.java.lfarkas 2008-08-01 23:31:28.000000000 +0200 ++++ ./src/RXTXCommDriver.java 2008-08-01 23:31:59.000000000 +0200 +@@ -42,7 +42,7 @@ + static + { + if(debug ) System.out.println("RXTXCommDriver {}"); +- System.loadLibrary( "rxtxSerial" ); ++ System.load("@JNIPATH@/" + System.mapLibraryName("rxtxSerial")); + + /* + Perform a crude check to make sure people don't mix +--- ./src/LPRPort.java.lfarkas 2008-08-01 23:28:08.000000000 +0200 ++++ ./src/LPRPort.java 2008-08-01 23:28:34.000000000 +0200 +@@ -32,7 +32,7 @@ + { + + static { +- System.loadLibrary( "rxtxParallel" ); ++ System.load("@JNIPATH@/" + System.mapLibraryName("rxtxParallel")); + Initialize(); + } + +--- ./src/RS485.java.lfarkas 2008-08-01 23:25:53.000000000 +0200 ++++ ./src/RS485.java 2008-08-01 23:26:31.000000000 +0200 +@@ -32,7 +32,7 @@ + + static + { +- System.loadLibrary( "rxtxRS485" ); ++ System.load("@JNIPATH@/" + System.mapLibraryName("rxtxRS485")); + Initialize(); + } + +--- ./src/CommPortIdentifier.java.lfarkas 2008-08-01 23:30:13.000000000 +0200 ++++ ./src/CommPortIdentifier.java 2008-08-01 23:30:43.000000000 +0200 +@@ -80,7 +80,7 @@ + if (debug) + System.out.println("Have not implemented native_psmisc_report_owner(PortName)); in CommPortIdentifier"); + } +- System.loadLibrary( "rxtxSerial" ); ++ System.load("@JNIPATH@/" + System.mapLibraryName("rxtxSerial")); + } + CommPortIdentifier ( String pn, CommPort cp, int pt, CommDriver driver) + { +--- ./src/RXTXVersion.java.lfarkas 2008-08-01 23:28:44.000000000 +0200 ++++ ./src/RXTXVersion.java 2008-08-01 23:29:09.000000000 +0200 +@@ -36,7 +36,7 @@ + private static String Version; + + static { +- System.loadLibrary( "rxtxSerial" ); ++ System.load("@JNIPATH@/" + System.mapLibraryName("rxtxSerial")); + Version = "RXTX-2.1-7"; + } + /** diff --git a/rxtx-2.1-uts.patch b/rxtx-2.1-uts.patch new file mode 100644 index 0000000..fdce804 --- /dev/null +++ b/rxtx-2.1-uts.patch @@ -0,0 +1,63 @@ +diff -up ./src/I2CImp.c.p3 ./src/I2CImp.c +--- ./src/I2CImp.c.p3 2004-10-17 16:23:02.000000000 +0200 ++++ ./src/I2CImp.c 2008-08-19 16:33:25.000000000 +0200 +@@ -86,7 +86,7 @@ JNIEXPORT void JNICALL Java_gnu_io_I2CPo + sigaction( SIGIO, NULL, &handler ); + if( !handler.sa_handler ) signal( SIGIO, SIG_IGN ); + #endif /* !__FreeBSD__ */ +-#if defined(__linux__) ++#if defined(DEBUG) && defined(__linux__) + /* Lets let people who upgraded kernels know they may have problems */ + if (uname (&name) == -1) + { +@@ -98,7 +98,7 @@ JNIEXPORT void JNICALL Java_gnu_io_I2CPo + fprintf(stderr, "\n\n\nRXTX WARNING: This library was compiled to run with OS release %s and you are currently running OS release %s. In some cases this can be a problem. Try recompiling RXTX if you notice strange behavior. If you just compiled RXTX make sure /usr/include/linux is a symbolic link to the include files that came with the kernel source and not an older copy.\n\n\npress enter to continue\n",UTS_RELEASE,name.release); + getchar(); + } +-#endif /* __linux__ */ ++#endif /* DEBUG && __linux__ */ + #endif /* WIN32 */ + } + +diff -up ./src/RawImp.c.p3 ./src/RawImp.c +--- ./src/RawImp.c.p3 2004-10-16 18:20:35.000000000 +0200 ++++ ./src/RawImp.c 2008-08-19 16:33:25.000000000 +0200 +@@ -230,7 +230,7 @@ JNIEXPORT void JNICALL Java_gnu_io_RawPo + sigaction( SIGIO, NULL, &handler ); + if( !handler.sa_handler ) signal( SIGIO, SIG_IGN ); + #endif /* !__FreeBSD__ */ +-#if defined(__linux__) ++#if defined(DEBUG) && defined(__linux__) + /* Lets let people who upgraded kernels know they may have problems */ + if (uname (&name) == -1) + { +@@ -242,7 +242,7 @@ JNIEXPORT void JNICALL Java_gnu_io_RawPo + fprintf(stderr, "\n\n\nRXTX WARNING: This library was compiled to run with OS release %s and you are currently running OS release %s. In some cases this can be a problem. Try recompiling RXTX if you notice strange behavior. If you just compiled RXTX make sure /usr/include/linux is a symbolic link to the include files that came with the kernel source and not an older copy.\n\n\npress enter to continue\n",UTS_RELEASE,name.release); + getchar(); + } +-#endif /* __linux__ */ ++#endif /* DEBUG && __linux__ */ + #endif /* WIN32 */ + } + +diff -up ./src/RS485Imp.c.p3 ./src/RS485Imp.c +--- ./src/RS485Imp.c.p3 2008-08-19 16:35:10.000000000 +0200 ++++ ./src/RS485Imp.c 2008-08-19 16:35:49.000000000 +0200 +@@ -86,7 +86,7 @@ JNIEXPORT void JNICALL Java_gnu_io_RS485 + sigaction( SIGIO, NULL, &handler ); + if( !handler.sa_handler ) signal( SIGIO, SIG_IGN ); + #endif /* !__FreeBSD__ */ +-#if defined(__linux__) ++#if defined(DEBUG) && defined(__linux__) + /* Lets let people who upgraded kernels know they may have problems */ + if (uname (&name) == -1) + { +@@ -98,7 +98,7 @@ JNIEXPORT void JNICALL Java_gnu_io_RS485 + fprintf(stderr, "\n\n\nRXTX WARNING: This library was compiled to run with OS release %s and you are currently running OS release %s. In some cases this can be a problem. Try recompiling RXTX if you notice strange behavior. If you just compiled RXTX make sure /usr/include/linux is a symbolic link to the include files that came with the kernel source and not an older copy.\n\n\npress enter to continue\n",UTS_RELEASE,name.release); + getchar(); + } +-#endif /* __linux__ */ ++#endif /* DEBUG && __linux__ */ + #endif /* WIN32 */ + } + diff --git a/rxtx.spec b/rxtx.spec new file mode 100644 index 0000000..a37690b --- /dev/null +++ b/rxtx.spec @@ -0,0 +1,77 @@ +%define upver 2.1 +%define uprel 7r2 +%define rel 0.2 +#define jni %{_jnidir} +%define jni %{_libdir}/%{name} + +Summary: Parallel communication for the Java Development Toolkit +Name: rxtx +Version: %{upver} +Release: %{rel}.%{uprel}%{?dist} +License: LGPLv2+ +Group: System Environment/Libraries +URL: http://rxtx.qbang.org/ +Source: http://rxtx.qbang.org/pub/rxtx/%{name}-%{upver}-%{uprel}.zip +Patch1: %{name}-%{version}-loadlibrary.patch +Patch2: %{name}-%{version}-configure.patch +Patch3: %{name}-%{version}-uts.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +#BuildRequires: java-devel >= 1:1.6.0 +BuildRequires: java-devel +BuildRequires: jpackage-utils +BuildRequires: libtool automake +#BuildRequires: ant >= 1.7.0 +#BuildRequires: ant-junit >= 1.7.0 +#BuildRequires: junit4 +#Requires: java >= 1:1.6.0 +Requires: java +Requires: jpackage-utils +ExcludeArch: ppc ppc64 + +%description +rxtx is an full implementation of java commapi which aims to support RS232 +IEEE 1284, RS485, I2C and RawIO. + +%prep +%setup -q -n rxtx-%{upver}-%{uprel} +sed -e 's|@JNIPATH@|%{jni}|' %{PATCH1} | patch -s -b --suffix .p1 -p1 +%patch2 -p1 -b .p2 +%patch3 -p1 -b .p3 +# remove prebuild binaries +find . -name '*.jar' -exec rm {} \; +find . -name '*.hqx' -exec rm {} \; + +%build +./autogen.sh +export JAVA_HOME=%{java_home} +%configure +# parallel make fails with make %%{?_smp_mflags} +make +iconv -f ISO_8859-1 -t UTF-8 ChangeLog >ChangeLog.utf-8 +mv ChangeLog.utf-8 ChangeLog + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{_javadir} %{buildroot}%{jni} +make RXTX_PATH=%{buildroot}%{jni} JHOME=%{buildroot}%{_javadir} install +#echo "Driver=gnu.io.RXTXCommDriver" > %{buildroot}%{_javadir}/gnu.io.rxtx.properties +find %{buildroot} -name '*.la' -exec rm {} \; + +%clean +rm -rf %{buildroot} + +%files +%defattr(-,root,root,-) +%doc AUTHORS COPYING ChangeLog INSTALL README* TODO +%{_javadir}/* +%{jni} + +%changelog +* Thu Sep 25 2008 Levente Farkas - 2.1-0.2.7r2 +- a few more spec file cleanup + +* Mon Sep 15 2008 Levente Farkas - 2.1-0.1.7r2 +- update as requested by fedora + +* Thu Jul 21 2008 Gergo Csontos - 2.1 +- Initial release diff --git a/sources b/sources index e69de29..50679c0 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +9290b4832d46199f8d798a531209640b rxtx-2.1-7r2.zip