File rxtx-java.spec of Package rxtx-java
# norootforbuild
# rxtx-2.2pre2.zip
%define src_name rxtx
Name: rxtx-java
Version: 2.2pre2
Release: 1
License: LGPL
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{src_name}-%{version}.zip
#Source0: %{src_name}-%{version}.tar.bz2
URL: http://rxtx.qbang.org/wiki/index.php/Main_Page
BuildRequires: unzip
BuildRequires: java-devel
# this Requires imports the path we install stuff into
# there must be a better way to get that result.
Requires: java
Group: Development/Libraries/Java
Summary: Full Java CommAPI implementation
%description
RxTx is a Java library, using a native implementation (via JNI), providing serial
and parallel communication for the Java Development Toolkit (JDK). It is based on
the specification for Sun's Java Communications API.
%if 0%{?suse_version} < 110
%debug_package
%endif
%prep
%setup -q -n %{src_name}-%{version}
%build
export THREADS_FLAG=native
rm acinclude.m4 config.guess config.sub install-sh ltmain.sh missing mkinstalldirs aclocal.m4 Makefile.in ltconfig stamp-h.in
./autogen.sh
CFLAGS="$RPM_OPT_FLAGS" LDFLAGS=-s %configure
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_javadir} $RPM_BUILD_ROOT%{_libdir}
make RXTX_PATH=$RPM_BUILD_ROOT%{_libdir} JHOME=$RPM_BUILD_ROOT%{_javadir} install
find $RPM_BUILD_ROOT/usr -xtype f -print | \
sed "s@^$RPM_BUILD_ROOT@@g" > INSTALLED_FILES
if [ "$(cat INSTALLED_FILES)X" = "X" ] ; then
echo "No files!"
exit -1
fi
%clean
rm -rf "$RPM_BUILD_ROOT"
%files -f INSTALLED_FILES
%defattr(-,root,root)
%exclude %{_libdir}/*.la
%doc AUTHORS ChangeLog README RMISecurityManager.html COPYING INSTALL PORTING TODO
%changelog