]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tools/release/tinyos-tools.spec
Adjust build scripts.
[tinyos-2.x.git] / tools / release / tinyos-tools.spec
index 9353741407d6819aae8c5a51d1c2eea75e954e84..0fe0968f79a017c967b753babf98545847c21525 100644 (file)
@@ -2,8 +2,8 @@
 
 Summary: TinyOS tools 
 Name: tinyos-tools
-Version: 1.2.2
-Release: 1
+Version: 1.4.0
+Release: 1%{dist}
 License: Please see source
 Group: Development/System
 URL: http://www.tinyos.net/
@@ -11,11 +11,11 @@ BuildRoot: %{_tmppath}/%{name}-root
 Source0: %{name}-%{version}.tar.gz
 # This makes cygwin happy
 Provides: /bin/sh /bin/bash
-Requires: nesc >= 1.2.7
+Requires: nesc >= 1.3
 
 %description
 Tools for use with tinyos. Includes, for example: uisp, motelist, pybsl, mig,
-ncc and nesdoc. The source for these tools is found in the TinyOS CSV
+ncc and nesdoc. The source for these tools is found in the TinyOS CVS
 repository under tinyos-2.x/tools.
 
 %prep
@@ -24,7 +24,7 @@ repository under tinyos-2.x/tools.
 %build
 cd tools
 ./Bootstrap
-TOSDIR=/opt/tinyos-2.x/tos ./configure --prefix=/usr
+NESCC_PREFIX=/usr TOSDIR=/opt/tinyos-2.x/tos ./configure --prefix=/usr
 make
 
 %install
@@ -58,12 +58,22 @@ if [ $? -ne 0 ]; then
   echo "Java not found, not installing JNI code"
   exit 0
 fi
-echo "Installing Java JNI code in $jni ... "
 %ifos linux
-for lib in $RPM_INSTALL_PREFIX/lib/tinyos/*.so; do 
-  install $lib "$jni" || exit 0
+java=`$RPM_INSTALL_PREFIX/bin/tos-locate-jre --java`
+tinyoslibdir=$RPM_INSTALL_PREFIX/lib/tinyos
+bits=32
+if [ $? -ne 0 ]; then
+  echo "java command not found - assuming 32 bits"
+elif file -L $java/java | grep -q 64-bit; then
+  bits=64
+fi
+echo "Installing $bits-bit Java JNI code in $jni ... "
+for lib in $tinyoslibdir/*-$bits.so; do 
+  realname=`basename $lib | sed -e s/-$bits\.so/.so/`
+  install $lib "$jni/$realname" || exit 1
 done
 %else
+echo "Installing Java JNI code in $jni ... "
 for lib in $RPM_INSTALL_PREFIX/lib/tinyos/*.dll; do 
   install --group=SYSTEM $lib "$jni" || exit 0
 done
@@ -74,6 +84,8 @@ echo "done."
 # Remove JNI code on uninstall
 
 %changelog
+* Sun Jul 29 2007 <pal@cs.stanford.edu> 1.2.4-2
+- Add 64-bit support for Java VMs and deluge tools.
 * Wed Jul 5 2006 <kwright@archrock.com> 1.2.2-1
 * Thu Feb 9 2006 <david.e.gay@intel.com> 1.2.1-2
 * Sat Feb 4 2006 <kwright@cs.berkeley.edu> 1.2.1-1