Index: src/scripts/tsp_dev.login.sh
===================================================================
--- src/scripts/tsp_dev.login.sh	(révision 4)
+++ src/scripts/tsp_dev.login.sh	(révision 205)
@@ -1,53 +0,0 @@
-#!/bin/sh
-# Do not EDIT: src/scripts/tsp_dev.login.sh generated from src/scripts/tsp_dev.login.sh.in by CMake.
-##############################
-# Find host type
-##############################
-
-export HOST_ARCH=Linux
-echo "Using host target <$HOST_ARCH>"
-
-# %%tsp_base%% will be set by the configure script 
-export TSP_BASE=/home/noularde/TSP/tsp_all/tsp
-echo "Using TSP_BASE=$TSP_BASE"
-
-##############################
-# HOME_EXEC_BASE / HOME_EXEC_CURRENT
-##############################
-
-export HOME_EXEC_BASE=$TSP_BASE/exec
-export HOME_EXEC_CURRENT=$HOME_EXEC_BASE/current
-
-
-##############################
-# Paths
-##############################
-
-
-export PATH=${TSP_BASE}/src/scripts:${HOME_EXEC_BASE}/${HOST_ARCH}/Debug/bin:${HOME_EXEC_BASE}/scripts:${HOME_EXEC_CURRENT}/${HOST_ARCH}/debug/bin:${HOME_EXEC_CURRENT}/scripts:${PATH}
-
-
-##############################
-# DEVBASE
-##############################
-
-
-export DEVBASE=$TSP_BASE
-echo "Using DEVBASE=$DEVBASE"
-
-if [ -z "$STRACE_DEBUG" ]; then 
-    export STRACE_DEBUG=1
-fi
-echo "Using STRACE_DEBUG=$STRACE_DEBUG"
-
-
-alias go_bin='cd ${HOME_EXEC_CURRENT}/${HOST_ARCH}/debug/bin'
-alias go_tsp='cd ${TSP_BASE}'
-alias go_scripts='cd ${TSP_BASE}/src/scripts'
-alias go_tests='cd ${TSP_BASE}/tests'
-
-
-
-
-
-
Index: src/scripts/tsp.spec
===================================================================
--- src/scripts/tsp.spec	(révision 4)
+++ src/scripts/tsp.spec	(révision 205)
@@ -1,142 +0,0 @@
-Summary:        TSP : library for a generic Transport Sampling Protocol
-Name:           tsp
-Version:        0.8.0
-Release:        1
-Group:          Applications/Communications
-URL:            https://savannah.nongnu.org/projects/tsp
-License:        LGPL
-Vendor:		The TSP Team Worldwide
-Source:         %{name}-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
-
-%package apidoc
-Group: 	Documentation
-Summary:	The TSP API Documentation
-%description apidoc
-The TSP API documentation as generated by doxygen
-
-
-%define prefix /opt/tsp-%{version}
-%define rpmprefix $RPM_BUILD_ROOT%{prefix}
-%define srcdir /%_topdir/SOURCES
-
-
-#BuildRequires:  
-
-%description
-TSP : library for a generic Transport Sampling Protocol
-TSP is both a protocol and a library available in C and Java
-that may be used to observe evolutionary data. 
-Main applications of TSP are test beds and simulator
-be it realtime or not.
-
-%prep
-rm -rf %{name}
-tar xvfz %{srcdir}/%{name}-%{version}.tar.gz 
-
-%build
-cd %{name}
-./configure --prefix=%{rpmprefix} --enable-openGL --enable-apidoc
-source src/scripts/tsp_dev.login.sh
-make distclean
-make
-# second make necessary for tsp_rpc_cleanup
-make
-  
-%install 
-cd %{name}
-source src/scripts/tsp_dev.login.sh
-make install
-
-%clean
-rm -rf %{name}
-
-%post
-if [ -d  /etc/profile.d ]; then
-  cd /etc/profile.d
-  ln -sf %{prefix}/scripts/tsp_profile.sh
-  ln -sf %{prefix}/scripts/tsp_profile.csh
-fi
-if [ -d /usr/lib/pkgconfig ]; then
-  cd /usr/lib/pkgconfig
-  ln -sf %{prefix}/scripts/tsp.pc
-fi
-
-%preun
-
-%postun
-rm -rf %{prefix}/bin
-rm -rf %{prefix}/scripts
-rm -rf %{prefix}/include
-rm -rf %{prefix}/lib
-if [ ! -r /etc/profile.d/tsp_profile.sh ]; then
-   rm /etc/profile.d/tsp_profile.sh
-fi
-if [ ! -r /etc/profile.d/tsp_profile.sh ]; then
-   rm /etc/profile.d/tsp_profile.csh
-fi
-if [ ! -r /usr/lib/pkgconfig/tsp.pc ]; then
-   rm /usr/lib/pkgconfig/tsp.pc
-fi
-
-%postun apidoc
-rm -rf %{prefix}/doc
-
-%files
-%defattr(-,root,root,0644)
-%attr(0755, root, root) %{prefix}/bin/*
-%attr(0755, root, root) %{prefix}/scripts/*
-%attr(0644, root, root) %{prefix}/include/*.h
-%attr(0644, root, root) %{prefix}/lib/lib*
-
-%files apidoc
-%defattr(-,root,root,0644)
-%attr(0644, root, root) %{prefix}/doc/api/html/*
-
-%changelog
-* Fri Apr 28 2006 Erk
-  - Add second make call for tsp_rpc_cleanup
-* Wed Mar 22 2006 Erk
-  - Ready to tag 0.7.3
-  - Make postun scripts for main package and apidoc package
-    really do their jobs
-* Sun Mar 12 2006 Erk
-  - Add tsp.pc file for pkg-config
-  - Change install prefix from /opt/tsp to /opt/tsp-%{version}
-* Sat Mar 11 2006 Erk
-  - Add tsp-apidoc sub-package this package may contain
-    only header and footer if doxygen is not installed
-* Sun Jan 29 2006 Erk
-  - Prepare TSP 0.7.2
-* Sun Jan 29 2006 Erk
-  - Prepare TSP 0.7.1
-* Fri Dec 1 2005 Erk
-  - TSP 0.7.1cvs
-    We should change the version as soon as preceding version
-    released in order to avoid CVS and real version mismatch
-* Fri Nov 1 2005 Erk
-  - TSP 0.7.0
-* Fri Oct 14 2005 Erk
-  - add link to /etc/profile.d/ during post
-  - delete those link during preun
-* Thu Oct 13 2005 Erk
-  - bump to 0.7.0pre1
-* Tue Sep 6  2005 Erk
-  - use shell wildcard in order to select files as suggested
-    by Fred. B.M. in order to avoid to try to install non generated
-    binaries on box where some devel libraries were not detected
-    by the configure script.
-* Sun Aug 28 2005 Erk
-  - bb_create and bb_publish
-* Sun Aug 14 2005 Erk
-  - Added new bb_check_version and rename bb_checkid --> bb_check_id
-  - Change install path location prefix from /usr/local/tsp
-    to /opt/tsp which is the recommanded path from 
-    FHS 2.3 (http://www.pathname.com/fhs/) and
-    LSB 3.0 (http://www.linuxbase.org/ or 
-             http://lsbbook.gforge.freestandards.org/install-app.html)
-* Tue Jul 19 2005 Erk
-  - Update spec file for TSP 0.6.5
-* Mon Mar 10 2005 Frederic Blanchet-Momas
-  - Initial RPM release.
-
Index: src/scripts/tsp_profile.sh
===================================================================
--- src/scripts/tsp_profile.sh	(révision 4)
+++ src/scripts/tsp_profile.sh	(révision 205)
@@ -1,3 +0,0 @@
-#!/bin/sh
-export TSP_HOME=/opt/tsp
-export PATH=$PATH:$TSP_HOME/bin:$TSP_HOME/scripts
Index: src/scripts/tsp_profile.csh
===================================================================
--- src/scripts/tsp_profile.csh	(révision 4)
+++ src/scripts/tsp_profile.csh	(révision 205)
@@ -1,3 +0,0 @@
-#!/bin/csh
-set TSP_HOME /opt/tsp
-setenv PATH $PATH:$TSP_HOME/bin:$TSP_HOME/scripts
Index: src/scripts/tsp.pc
===================================================================
--- src/scripts/tsp.pc	(révision 4)
+++ src/scripts/tsp.pc	(révision 205)
@@ -1,12 +0,0 @@
-prefix=/opt/tsp-0.8.cvs
-exec_prefix=/opt/tsp-0.8.cvs
-libdir=/opt/tsp-0.8.cvs/lib
-includedir=/opt/tsp-0.8.cvs/include
-
-
-Name: tsp
-Version: 0.8.cvs
-Description: Transport Sample Protocol
-Requires: 
-Libs: -L${libdir} -ltsp_consumer -ltsp_provider -lbb -ltsp_common -lpthread -lm 
-Cflags: -I${includedir}
Index: src/scripts/tsp_dev.login
===================================================================
--- src/scripts/tsp_dev.login	(révision 4)
+++ src/scripts/tsp_dev.login	(révision 205)
@@ -1,45 +0,0 @@
-#!/bin/csh
-# Do not EDIT: src/scripts/tsp_dev.login generated from src/scripts/tsp_dev.login.in by CMake.
-
-##############################
-# Find host type
-##############################
-setenv HOST_ARCH Linux
-echo "Using host target <$HOST_ARCH>"
-if ( "$HOST_ARCH" != "linux") then
-	alias make gmake
-endif
-##############################
-# HOME_EXEC_BASE / HOME_EXEC_CURRENT
-##############################
-# %%tsp_base%% will be set by the configure script 
-setenv TSP_BASE /home/noularde/TSP/tsp_all/tsp
-echo "Using TSP_BASE=$TSP_BASE"
-setenv HOME_EXEC_BASE $TSP_BASE/exec
-setenv HOME_EXEC_CURRENT $HOME_EXEC_BASE/current
-
-##############################
-# Paths
-##############################
-setenv PATH ${TSP_BASE}/src/scripts:${HOME_EXEC_BASE}/${HOST_ARCH}/Debug/bin:${HOME_EXEC_BASE}/scripts:${HOME_EXEC_CURRENT}/${HOST_ARCH}/debug/bin:${HOME_EXEC_CURRENT}/scripts:${PATH}
-
-##############################
-# DEVBASE
-##############################
-setenv DEVBASE $TSP_BASE
-echo "Using DEVBASE=$DEVBASE"
-
-if ( ! $?STRACE_DEBUG ) then 
-	setenv STRACE_DEBUG 1
-endif
-echo "Using STRACE_DEBUG=$STRACE_DEBUG"
-
-
-##############################
-# ALIAS
-##############################
-alias go_bin 'cd ${HOME_EXEC_CURRENT}/bin'
-alias go_tsp 'cd ${TSP_BASE}'
-alias go_scripts 'cd ${TSP_BASE}/src/scripts'
-alias go_tests 'cd ${TSP_BASE}/tests'
-
Index: src/scripts/tsp_dev.login.in
===================================================================
--- src/scripts/tsp_dev.login.in	(révision 4)
+++ src/scripts/tsp_dev.login.in	(révision 205)
@@ -4,42 +4,36 @@
 ##############################
 # Find host type
 ##############################
-setenv HOST_ARCH @HOST_TARGET@
+setenv HOST_ARCH @CMAKE_SYSTEM_NAME@
 echo "Using host target <$HOST_ARCH>"
 if ( "$HOST_ARCH" != "linux") then
-	alias make gmake
+    alias make gmake
 endif
-##############################
-# HOME_EXEC_BASE / HOME_EXEC_CURRENT
-##############################
+
+
 # %%tsp_base%% will be set by the configure script 
-setenv TSP_BASE @TSP_BASE@
-echo "Using TSP_BASE=$TSP_BASE"
-setenv HOME_EXEC_BASE $TSP_BASE/exec
-setenv HOME_EXEC_CURRENT $HOME_EXEC_BASE/current
+setenv TSP_SRC_BASE @PROJECT_SOURCE_DIR@
+setenv TSP_BIN_BASE @PROJECT_BINARY_DIR@
+echo   "Using TSP_SRC_BASE=${TSP_SRC_BASE}"
+echo   "Using TSP_BIN_BASE=${TSP_BIN_BASE}"
 
 ##############################
 # Paths
 ##############################
-setenv PATH ${TSP_BASE}/src/scripts:${HOME_EXEC_BASE}/${HOST_ARCH}/Debug/bin:${HOME_EXEC_BASE}/scripts:${HOME_EXEC_CURRENT}/${HOST_ARCH}/debug/bin:${HOME_EXEC_CURRENT}/scripts:${PATH}
+setenv PATH ${TSP_BIN_BASE}/${HOST_ARCH}/Debug/bin:${TSP_BIN_BASE}/scripts:${PATH}
 
 ##############################
 # DEVBASE
 ##############################
-setenv DEVBASE $TSP_BASE
-echo "Using DEVBASE=$DEVBASE"
-
 if ( ! $?STRACE_DEBUG ) then 
 	setenv STRACE_DEBUG 1
 endif
-echo "Using STRACE_DEBUG=$STRACE_DEBUG"
+echo "Using STRACE_DEBUG=${STRACE_DEBUG}"
 
 
 ##############################
 # ALIAS
 ##############################
-alias go_bin 'cd ${HOME_EXEC_CURRENT}/bin'
-alias go_tsp 'cd ${TSP_BASE}'
-alias go_scripts 'cd ${TSP_BASE}/src/scripts'
-alias go_tests 'cd ${TSP_BASE}/tests'
+alias go_bin_tsp 'cd ${TSP_BIN_BASE}/${HOST_ARCH}/Debug/bin'
+alias go_src_tsp 'cd ${TSP_SRC_BASE}'
 
Index: src/scripts/tsp_dev.login.sh.in
===================================================================
--- src/scripts/tsp_dev.login.sh.in	(révision 4)
+++ src/scripts/tsp_dev.login.sh.in	(révision 205)
@@ -1,50 +1,34 @@
 #!/bin/sh
 # Do not EDIT: @configure_input@
 ##############################
-# Find host type
+# Set Host type
 ##############################
 
-export HOST_ARCH=@HOST_TARGET@
+export HOST_ARCH=@CMAKE_SYSTEM_NAME@
 echo "Using host target <$HOST_ARCH>"
 
-# %%tsp_base%% will be set by the configure script 
-export TSP_BASE=@TSP_BASE@
-echo "Using TSP_BASE=$TSP_BASE"
-
-##############################
-# HOME_EXEC_BASE / HOME_EXEC_CURRENT
-##############################
-
-export HOME_EXEC_BASE=$TSP_BASE/exec
-export HOME_EXEC_CURRENT=$HOME_EXEC_BASE/current
-
+# %%tsp_xxx_base%% will be set by CMake 
+export TSP_SRC_BASE=@PROJECT_SOURCE_DIR@
+export TSP_BIN_BASE=@PROJECT_BINARY_DIR@
+echo   "Using TSP_SRC_BASE=$TSP_SRC_BASE"
+echo   "Using TSP_BIN_BASE=$TSP_BIN_BASE"
 
 ##############################
 # Paths
 ##############################
-
-
-export PATH=${TSP_BASE}/src/scripts:${HOME_EXEC_BASE}/${HOST_ARCH}/Debug/bin:${HOME_EXEC_BASE}/scripts:${HOME_EXEC_CURRENT}/${HOST_ARCH}/debug/bin:${HOME_EXEC_CURRENT}/scripts:${PATH}
-
+export PATH=${TSP_BIN_BASE}/${HOST_ARCH}/Debug/bin:${TSP_BIN_BASE}/scripts:${PATH}
 
 ##############################
 # DEVBASE
 ##############################
-
-
-export DEVBASE=$TSP_BASE
-echo "Using DEVBASE=$DEVBASE"
-
-if [ -z "$STRACE_DEBUG" ]; then 
+if [ -z "${STRACE_DEBUG}" ]; then 
     export STRACE_DEBUG=1
 fi
-echo "Using STRACE_DEBUG=$STRACE_DEBUG"
+echo "Using STRACE_DEBUG=${STRACE_DEBUG}"
 
+alias go_bin_tsp='cd ${TSP_BIN_BASE}/${HOST_ARCH}/Debug/bin'
+alias go_src_tsp='cd ${TSP_SRC_BASE}'
 
-alias go_bin='cd ${HOME_EXEC_CURRENT}/${HOST_ARCH}/debug/bin'
-alias go_tsp='cd ${TSP_BASE}'
-alias go_scripts='cd ${TSP_BASE}/src/scripts'
-alias go_tests='cd ${TSP_BASE}/tests'
 
 
 
Index: src/scripts/tsp.spec.in
===================================================================
--- src/scripts/tsp.spec.in	(révision 0)
+++ src/scripts/tsp.spec.in	(révision 205)
@@ -0,0 +1,140 @@
+Summary:        TSP : library for a generic Transport Sampling Protocol
+Name:           tsp
+Version:        @PACKAGE_VERSION@
+Release:        1
+Group:          Applications/Communications
+URL:            https://savannah.nongnu.org/projects/tsp
+License:        LGPL
+Vendor:		The TSP Team Worldwide
+Source:         %{name}-%{version}-Source.tar.gz
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
+
+%package apidoc
+Group: 	 Documentation
+Summary: The TSP API Documentation
+%description apidoc
+The TSP API documentation as generated by doxygen
+
+%define prefix @CMAKE_INSTALL_PREFIX@
+%define rpmprefix $RPM_BUILD_ROOT%{prefix}
+%define srcdir /%_topdir/SOURCES
+%define tspsrcdirname %{name}-%{version}-Source
+
+#BuildRequires:  
+
+%description
+TSP : library for a generic Transport Sampling Protocol
+TSP is both a protocol and a library available in C and Java
+that may be used to observe evolutionary data. 
+Main applications of TSP are test beds and simulator
+be it realtime or not.
+
+%prep
+rm -rf %{tspsrcdirname}
+tar xvfz %{srcdir}/%{name}-%{version}-Source.tar.gz 
+
+%build
+mkdir build_tree
+cd build_tree
+cmake -DBUILD_API_DOC:bool=ON ../%{tspsrcdirname}
+make
+  
+%install 
+cd build_tree
+make install
+
+%clean
+rm -rf %{tspsrcdirname}
+rm -rf build_tree
+
+%post
+if [ -d  /etc/profile.d ]; then
+  cd /etc/profile.d
+  ln -sf %{prefix}/scripts/tsp_profile.sh
+  ln -sf %{prefix}/scripts/tsp_profile.csh
+fi
+if [ -d /usr/lib/pkgconfig ]; then
+  cd /usr/lib/pkgconfig
+  ln -sf %{prefix}/scripts/tsp.pc
+fi
+
+%preun
+
+%postun
+rm -rf %{prefix}/bin
+rm -rf %{prefix}/scripts
+rm -rf %{prefix}/include
+rm -rf %{prefix}/lib
+if [ ! -r /etc/profile.d/tsp_profile.sh ]; then
+   rm /etc/profile.d/tsp_profile.sh
+fi
+if [ ! -r /etc/profile.d/tsp_profile.sh ]; then
+   rm /etc/profile.d/tsp_profile.csh
+fi
+if [ ! -r /usr/lib/pkgconfig/tsp.pc ]; then
+   rm /usr/lib/pkgconfig/tsp.pc
+fi
+
+%postun apidoc
+rm -rf %{prefix}/doc
+
+%files
+%defattr(-,root,root,0644)
+%attr(0755, root, root) %{prefix}/bin/*
+%attr(0755, root, root) %{prefix}/scripts/*
+%attr(0644, root, root) %{prefix}/include/*.h
+%attr(0644, root, root) %{prefix}/lib/lib*
+
+%files apidoc
+%defattr(-,root,root,0644)
+%attr(0644, root, root) %{prefix}/doc/api/html/*
+
+%changelog
+* Mon Oct 9 2006 Erk
+  - Switch to cmake build system
+* Fri Apr 28 2006 Erk
+  - Add second make call for tsp_rpc_cleanup
+* Wed Mar 22 2006 Erk
+  - Ready to tag 0.7.3
+  - Make postun scripts for main package and apidoc package
+    really do their jobs
+* Sun Mar 12 2006 Erk
+  - Add tsp.pc file for pkg-config
+  - Change install prefix from /opt/tsp to /opt/tsp-%{version}
+* Sat Mar 11 2006 Erk
+  - Add tsp-apidoc sub-package this package may contain
+    only header and footer if doxygen is not installed
+* Sun Jan 29 2006 Erk
+  - Prepare TSP 0.7.2
+* Sun Jan 29 2006 Erk
+  - Prepare TSP 0.7.1
+* Fri Dec 1 2005 Erk
+  - TSP 0.7.1cvs
+    We should change the version as soon as preceding version
+    released in order to avoid CVS and real version mismatch
+* Fri Nov 1 2005 Erk
+  - TSP 0.7.0
+* Fri Oct 14 2005 Erk
+  - add link to /etc/profile.d/ during post
+  - delete those link during preun
+* Thu Oct 13 2005 Erk
+  - bump to 0.7.0pre1
+* Tue Sep 6  2005 Erk
+  - use shell wildcard in order to select files as suggested
+    by Fred. B.M. in order to avoid to try to install non generated
+    binaries on box where some devel libraries were not detected
+    by the configure script.
+* Sun Aug 28 2005 Erk
+  - bb_create and bb_publish
+* Sun Aug 14 2005 Erk
+  - Added new bb_check_version and rename bb_checkid --> bb_check_id
+  - Change install path location prefix from /usr/local/tsp
+    to /opt/tsp which is the recommanded path from 
+    FHS 2.3 (http://www.pathname.com/fhs/) and
+    LSB 3.0 (http://www.linuxbase.org/ or 
+             http://lsbbook.gforge.freestandards.org/install-app.html)
+* Tue Jul 19 2005 Erk
+  - Update spec file for TSP 0.6.5
+* Mon Mar 10 2005 Frederic Blanchet-Momas
+  - Initial RPM release.
+
Index: src/scripts/tsp_profile.sh.in
===================================================================
--- src/scripts/tsp_profile.sh.in	(révision 0)
+++ src/scripts/tsp_profile.sh.in	(révision 205)
@@ -0,0 +1,3 @@
+#!/bin/sh
+export TSP_HOME=/opt/tsp
+export PATH=$PATH:$TSP_HOME/bin:$TSP_HOME/scripts
Index: src/scripts/tsp_profile.csh.in
===================================================================
--- src/scripts/tsp_profile.csh.in	(révision 0)
+++ src/scripts/tsp_profile.csh.in	(révision 205)
@@ -0,0 +1,3 @@
+#!/bin/csh
+set TSP_HOME /opt/tsp
+setenv PATH $PATH:$TSP_HOME/bin:$TSP_HOME/scripts
Index: src/scripts/tsp.pc.in
===================================================================
--- src/scripts/tsp.pc.in	(révision 4)
+++ src/scripts/tsp.pc.in	(révision 205)
@@ -1,7 +1,7 @@
-prefix=/opt/tsp-@PACKAGE_VERSION@
-exec_prefix=/opt/tsp-@PACKAGE_VERSION@
-libdir=/opt/tsp-@PACKAGE_VERSION@/lib
-includedir=/opt/tsp-@PACKAGE_VERSION@/include
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@CMAKE_INSTALL_PREFIX@/bin
+libdir=@CMAKE_INSTALL_PREFIX@/lib
+includedir=@CMAKE_INSTALL_PREFIX@/include
 
 
 Name: tsp
