%define svndate 20101024 %define snapshot 63 Name: bluecove Version: 2.1.1 Release: 0.2.%{svndate}snap%{snapshot}%{?dist} Summary: Implementation of JSR-82 Java Bluetooth API Group: System Environment/Libraries License: ASL 2.0 and LGPLv2+ and GPLv3+ URL: http://code.google.com/p/bluecove/ # Snapshot release sources Source0: http://snapshot.bluecove.org/distribution/download/%{version}-SNAPSHOT/%{version}-SNAPSHOT.%{snapshot}/bluecove-%{version}-SNAPSHOT-sources.tar.gz Source1: http://snapshot.bluecove.org/distribution/download/%{version}-SNAPSHOT/%{version}-SNAPSHOT.%{snapshot}/bluecove-gpl-%{version}-SNAPSHOT-sources.tar.gz Source2: http://snapshot.bluecove.org/distribution/download/%{version}-SNAPSHOT/%{version}-SNAPSHOT.%{snapshot}/bluecove-bluez-%{version}-SNAPSHOT-sources.tar.gz Source3: http://snapshot.bluecove.org/distribution/download/%{version}-SNAPSHOT/%{version}-SNAPSHOT.%{snapshot}/bluecove-emu-%{version}-SNAPSHOT-sources.tar.gz # Official release sources #Source0: http://bluecove.googlecode.com/files/bluecove-%{version}-sources.tar.gz #Source1: http://bluecove.googlecode.com/files/bluecove-gpl-%{version}-sources.tar.gz #Source2: http://bluecove.googlecode.com/files/bluecove-bluez-%{version}-sources.tar.gz #Source3: http://bluecove.googlecode.com/files/bluecove-emu-%{version}-sources.tar.gz Source4: README.dist BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: jpackage-utils BuildRequires: java-devel >= 1:1.6.0 BuildRequires: ant BuildRequires: bluez-libs-devel BuildRequires: ant-nodeps BuildRequires: libmatthew-java BuildRequires: dbus-java >= 2.5.1 Requires: jpackage-utils Requires: java >= 1:1.6.0 Requires: libmatthew-java Requires: dbus-java >= 2.5.1 %description BlueCove is a JSR-82 implementation on Java Standard Edition (J2SE) that currently interfaces with the Mac OS X, WIDCOMM, BlueSoleil and Microsoft Bluetooth stack. Originally developed by Intel Research and currently maintained by volunteers. This package adds additional support for: - Linux with BlueZ (bluecove-gpl) - Linux with BlueZ using DBUS for device discovery (bluecove-bluez) - Emulator for use with MicroEmulator (bluecove-emu) %prep %setup -q -n bluecove-%{version}-SNAPSHOT # unpack bluecove-gpl tar zxf %{SOURCE1} # unpack bluecove-bluez tar zxf %{SOURCE2} # unpack bluecove-emu tar zxf %{SOURCE3} find -name '*.class' -exec rm -f '{}' \; find -name '*.jar' -exec rm -f '{}' \; cp -p bluecove-gpl-%{version}-SNAPSHOT/AUTHORS.txt AUTHORS-gpl.txt cp -p bluecove-gpl-%{version}-SNAPSHOT/LICENSE.txt LICENSE-gpl.txt # add README.dist cp -p %{SOURCE4} . %build # build main bluecove ant jar -Dproduct_version=%{version} # build bluecove-gpl cd bluecove-gpl-%{version}-SNAPSHOT ant jar -Dproduct_version=%{version} \ -Dbluecove_main_dist_dir=../target \ -Dbluecove.native.resources.skip=true \ -Dbluecove.native.linker.options="" \ -DCC_compiler_options="${RPM_OPT_FLAGS} -fPIC -fno-stack-protector" # build bluecove-bluez cd ../bluecove-bluez-%{version}-SNAPSHOT ant jar -Dproduct_version=%{version} \ -Dbluecove_main_dist_dir=../target \ -Ddbus_java_jar=%{_javadir}/dbus-java/dbus.jar \ -Dlibmatthew_java_debug_jar=%{_libdir}/libmatthew-java/unix.jar \ -Dbluecove.native.resources.skip=true \ -Dbluecove.native.linker.options="" \ -DCC_compiler_options="${RPM_OPT_FLAGS} -fPIC -fno-stack-protector" # build bluecove-emu cd ../bluecove-emu-%{version}-SNAPSHOT ant jar -Dproduct_version=%{version} \ -Dbluecove_main_dist_dir=../target %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_javadir} mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}-SNAPSHOT ############ # BlueCove # ############ cp -p target/bluecove-%{version}.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar # create symlink without version (cd $RPM_BUILD_ROOT%{_javadir}/ && ln -sf %{name}-%{version}.jar %{name}.jar) ################ # BlueCove GPL # ################ cp -p bluecove-gpl-%{version}-SNAPSHOT/target/bluecove-gpl-%{version}.jar \ $RPM_BUILD_ROOT%{_libdir}/%{name}/%{name}-gpl-%{version}.jar # create symlink without version (cd $RPM_BUILD_ROOT%{_libdir}/%{name} && ln -sf %{name}-gpl-%{version}.jar %{name}-gpl.jar) # copy the GPL JNI library to library directory cp -p bluecove-gpl-%{version}-SNAPSHOT/target/*.so $RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}-SNAPSHOT ####################### # BlueCove BlueZ DBUS # ####################### cp -p bluecove-bluez-%{version}-SNAPSHOT/target/bluecove-bluez-%{version}.jar \ $RPM_BUILD_ROOT%{_libdir}/%{name}/%{name}-bluez-%{version}.jar # create symlink without version (cd $RPM_BUILD_ROOT%{_libdir}/%{name} && ln -sf %{name}-bluez-%{version}.jar %{name}-bluez.jar) # copy the BlueZ JNI library to library directory cp -p bluecove-bluez-%{version}-SNAPSHOT/target/*.so $RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}-SNAPSHOT ################ # BlueCove Emu # ################ cp -p bluecove-emu-%{version}-SNAPSHOT/target/bluecove-emu-%{version}.jar \ $RPM_BUILD_ROOT%{_javadir}/%{name}-emu-%{version}.jar # create symlink without version (cd $RPM_BUILD_ROOT%{_javadir}/ && ln -sf %{name}-emu-%{version}.jar %{name}-emu.jar) %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{_javadir}/* %{_libdir}/%{name} %doc AUTHORS.txt README.txt LICENSE.txt stacks.txt todo.txt AUTHORS-gpl.txt LICENSE-gpl.txt README.dist %changelog * Sat Jun 04 2011 F. Kooman - 2.1.1-0.2.20101024snap63 - rebuilt * Wed Nov 3 2010 François Kooman <fkooman@tuxed.net> - 2.1.1-0.1.20101024snap63 - update to new snapshot (20101024, r63) * Mon Apr 12 2010 François Kooman <fkooman@tuxed.net> - 2.1.1-0.1.20100401snap62 - update to new snapshot - make use of RPM_OPT_FLAGS for compiling JNI libs - add license LGPLv2+ to license tag as bluecove-gpl uses it * Mon Feb 7 2010 François Kooman <fkooman@tuxed.net> - 2.1.1-0.1.20090914snap60 - rework versio number * Mon Jan 11 2010 François Kooman <fkooman@tuxed.net> - 2.1.1-0.20090914.1 - remove GCJ support again as it breaks bluecove-bluez - fix files section redundancy * Sun Jan 10 2010 François Kooman <fkooman@tuxed.net> - 2.1.1-0.20090914 - update snapshot to 20090914 - fix source links to snapshot version - add GCJ support * Sat Jul 25 2009 François Kooman <fkooman@tuxed.net> - 2.1.1-0.20090624 - update snapshot to 20090624 * Sat May 16 2009 François Kooman <fkooman@tuxed.net> - 2.1.1-0.20090505 - update snapshot to 20090505 * Wed Mar 18 2009 François Kooman <fkooman@tuxed.net> - 2.1.1-0.20090317 - update snapshot to 20090317 - classpath not in manifest anymore (bluecove-bluez) - upstream fixed character encoding problem (bluecove) - renabled bluecove-bluez - dependency on dbus-java >= 2.5.1 (in updates testing fc10) - update README.dist to include more on how to use bluecove-bluez + fix typos * Sat Mar 14 2009 François Kooman <fkooman@tuxed.net> - 2.1.1-0.20090314 - prepare for release 2.1.1, update to snapshot 20090314 - remove upstreamed patches - add bluecove-bluez (uses dbus for device discovery) disabled for now as we need dbus-java >= 2.5.1 (BZ #490101) - add bluecove-emu - move libraries to versioned directory in libdir/bluecove per upstream request - remove ldconfig post and postun as other apps don't link to this - update README.dist - update package description * Sun Jan 25 2009 François Kooman <fkooman@tuxed.net> - 2.1.0-2 - remove javadoc sub package, there isn't any real documentation, only references to JSR-82 API docs at jcp.org - create symlinks without version numbers - remove gpl sub package, bluecove without gpl subpackage is useless - include the interesting docs from gpl subpackage in the package instead of the subpackage - include README.dist * Wed Jan 14 2009 François Kooman <fkooman@tuxed.net> - 2.1.0-1 - Initial Fedora package