[Tinyos-2-commits] CVS: tinyos-2.x/tools/release tinyos-tools.spec, 1.3, 1.4

David Gay idgay at users.sourceforge.net
Wed Jun 6 15:40:20 PDT 2007


Update of /cvsroot/tinyos/tinyos-2.x/tools/release
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv19157/release

Modified Files:
	tinyos-tools.spec 
Log Message:
build both 32 and 64-bit versions of the JNI code so as to support both
32 and 64-bit JDKs
install the appropriate JNI version depending on whether the JDK is 32 or 64-bit

all this is for Linux only for now


Index: tinyos-tools.spec
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tools/release/tinyos-tools.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** tinyos-tools.spec	7 Nov 2006 19:30:42 -0000	1.3
--- tinyos-tools.spec	6 Jun 2007 22:40:17 -0000	1.4
***************
*** 59,68 ****
    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
  done
  %else
  for lib in $RPM_INSTALL_PREFIX/lib/tinyos/*.dll; do 
    install --group=SYSTEM $lib "$jni" || exit 0
--- 59,77 ----
    exit 0
  fi
  %ifos linux
! java=`$RPM_INSTALL_PREFIX/bin/tos-locate-jre --java`
! 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



More information about the Tinyos-2-commits mailing list