Index: CMakeLists.txt
===================================================================
RCS file: /sources/tsp/tsp/CMakeLists.txt,v
retrieving revision 1.25
diff -r1.25 CMakeLists.txt
73c73
< SET(PACKAGE_VERSION_PATCH "3-cvs")
---
> SET(PACKAGE_VERSION_PATCH "3cvs")
182a183
>   SET(GLUT_DEVEL_PACKAGE "glut-devel")
479,480d479
< #SET(CPACK_SOURCE_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-Source)
< 
486,493c485,493
<   FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/RPM)
<   FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/RPM/tmp)
<   FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/RPM/BUILD)
<   FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/RPM/RPMS)
<   FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/RPM/SOURCES)
<   FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/RPM/SPECS)
<   FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/RPM/SRPMS)
< 
---
>   SET(RPM_ROOTDIR ${CMAKE_BINARY_DIR}/RPM)
>   FILE(MAKE_DIRECTORY ${RPM_ROOTDIR})
>   FILE(MAKE_DIRECTORY ${RPM_ROOTDIR}/tmp)
>   FILE(MAKE_DIRECTORY ${RPM_ROOTDIR}/BUILD)
>   FILE(MAKE_DIRECTORY ${RPM_ROOTDIR}/RPMS)
>   FILE(MAKE_DIRECTORY ${RPM_ROOTDIR}/SOURCES)
>   FILE(MAKE_DIRECTORY ${RPM_ROOTDIR}/SPECS)
>   FILE(MAKE_DIRECTORY ${RPM_ROOTDIR}/SRPMS)
>   
495,497c495,498
<     COMMAND cp ${CMAKE_BINARY_DIR}/${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz ${CMAKE_BINARY_DIR}/RPM/SOURCES
<     COMMAND cp ${CMAKE_BINARY_DIR}/src/scripts/tsp.spec ${CMAKE_BINARY_DIR}/RPM/SPECS
<     COMMAND rpmbuild -bs -vv --define="_topdir ${CMAKE_BINARY_DIR}/RPM" --buildroot=${CMAKE_BINARY_DIR}/RPM/tmp ${CMAKE_BINARY_DIR}/src/scripts/tsp.spec
---
>     COMMAND ${CMAKE_MAKE_PROGRAM} package_source
>     COMMAND ${CMAKE_COMMAND} -E copy ${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz ${RPM_ROOTDIR}/SOURCES    
>     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/src/scripts/tsp.spec ${RPM_ROOTDIR}/SPECS
>     COMMAND rpmbuild -bs --define=\"_topdir ${RPM_ROOTDIR}\" --buildroot=${RPM_ROOTDIR}/tmp ${CMAKE_BINARY_DIR}/src/scripts/tsp.spec
501,503c502,505
<     COMMAND cp ${CMAKE_BINARY_DIR}/${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz ${CMAKE_BINARY_DIR}/RPM/SOURCES
<     COMMAND cp ${CMAKE_BINARY_DIR}/src/scripts/tsp.spec ${CMAKE_BINARY_DIR}/RPM/SPECS
<     COMMAND rpmbuild -bb -vv  --define="_topdir ${CMAKE_BINARY_DIR}/RPM" --buildroot=${CMAKE_BINARY_DIR}/RPM/tmp ${CMAKE_BINARY_DIR}/src/scripts/tsp.spec
---
>     COMMAND ${CMAKE_MAKE_PROGRAM} package_source
>     COMMAND ${CMAKE_COMMAND} -E copy ${CPACK_SOURCE_PACKAGE_FILE_NAME}.tar.gz ${RPM_ROOTDIR}/SOURCES    
>     COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/src/scripts/tsp.spec ${RPM_ROOTDIR}/SPECS
>     COMMAND rpmbuild -bb --define=\"_topdir ${RPM_ROOTDIR}\" --buildroot=${RPM_ROOTDIR}/tmp ${CMAKE_BINARY_DIR}/src/scripts/tsp.spec
Index: make/FindDoxygen.cmake
===================================================================
RCS file: /sources/tsp/tsp/make/FindDoxygen.cmake,v
retrieving revision 1.3
diff -r1.3 FindDoxygen.cmake
25a26
>   SET(DOXYGEN_PACKAGE doxygen)
62a64
>   SET(DOXYGEN_DOT_PACKAGE graphviz)
Index: make/FindFUSE.cmake
===================================================================
RCS file: /sources/tsp/tsp/make/FindFUSE.cmake,v
retrieving revision 1.2
diff -r1.2 FindFUSE.cmake
49a50
>   SET(FUSE_DEVEL_PACKAGE fuse-devel)
56c57
<   )
\ No newline at end of file
---
>   )
Index: make/FindGTK.cmake
===================================================================
RCS file: /sources/tsp/tsp/make/FindGTK.cmake,v
retrieving revision 1.2
diff -r1.2 FindGTK.cmake
14a15
>   SET(GTK_DEVEL_PACKAGE gtk+-devel)  
Index: make/FindXML2.cmake
===================================================================
RCS file: /sources/tsp/tsp/make/FindXML2.cmake,v
retrieving revision 1.2
diff -r1.2 FindXML2.cmake
29a30
>   SET(XML2_DEVEL_PACKAGE libxml2-devel)
Index: src/consumers/CMakeLists.txt
===================================================================
RCS file: /sources/tsp/tsp/src/consumers/CMakeLists.txt,v
retrieving revision 1.3
diff -r1.3 CMakeLists.txt
33c33
< 		MESSAGE("Cannot build Visu3D some lib is missing")
---
> 		MESSAGE(STATUS "Cannot build Visu3D some lib is missing")
Index: src/scripts/tsp.spec.in
===================================================================
RCS file: /sources/tsp/tsp/src/scripts/tsp.spec.in,v
retrieving revision 1.1
diff -r1.1 tsp.spec.in
0a1
> # -*- rpm-spec -*-
10a12,13
> Requires:	pkgconfig 
> BuildRequires:	cmake @XML2_DEVEL_PACKAGE@ @GTK_DEVEL_PACKAGE@ @FUSE_DEVEL_PACKAGE@ @DOXYGEN_PACKAGE@ @DOXYGEN_DOT_PACKAGE@ @GLUT_DEVEL_PACKAGE@
18c21
< %define prefix @CMAKE_INSTALL_PREFIX@
---
> %define prefix /opt/tsp-%{version}
20d22
< %define srcdir /%_topdir/SOURCES
23,24d24
< #BuildRequires:  
< 
33,34c33
< rm -rf %{tspsrcdirname}
< tar xvfz %{srcdir}/%{name}-%{version}-Source.tar.gz 
---
> %setup -q -n %{tspsrcdirname}
36a36,37
> cd ..
> rm -rf build_tree
39c40
< cmake -DBUILD_API_DOC:bool=ON ../%{tspsrcdirname}
---
> cmake -DBUILD_API_DOC:bool=ON -DCMAKE_INSTALL_PREFIX=%{rpmprefix} ../%{tspsrcdirname}
40a42
> make apidoc
43c45
< cd build_tree
---
> cd ../build_tree
44a47,55
> mkdir -p $RPM_BUILD_ROOT/etc/profile.d
> mv %{rpmprefix}/scripts/tsp.profile.sh $RPM_BUILD_ROOT/etc/profile.d/tsp.sh
> mv %{rpmprefix}/scripts/tsp.profile.csh $RPM_BUILD_ROOT/etc/profile.d/tsp.csh
> mkdir -p $RPM_BUILD_ROOT/usr/lib/pkgconfig
> mv %{rpmprefix}/scripts/tsp.pc $RPM_BUILD_ROOT/usr/lib/pkgconfig
> rm -rf %{rpmprefix}/doc
> tar cf - doc/api/html | (cd %{rpmprefix}; tar xf -)
> cd %{rpmprefix}/doc/api/html
> find . -type f | xargs chmod -x
50,80d60
< %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
< 
82c62,65
< %defattr(-,root,root,0644)
---
> %defattr(-,root,root,-)
> %dir %{prefix}
> %dir %{prefix}/bin
> %dir %{prefix}/scripts
85,86c68,71
< %attr(0644, root, root) %{prefix}/include/*.h
< %attr(0644, root, root) %{prefix}/lib/lib*
---
> %{prefix}/lib
> %{prefix}/include
> /usr/lib/pkgconfig/*
> %attr(0755, root, root) /etc/profile.d/*
89,90c74,75
< %defattr(-,root,root,0644)
< %attr(0644, root, root) %{prefix}/doc/api/html/*
---
> %defattr(-,root,root,-)
> %{prefix}/doc
92a78,82
> * Wed Jan 24 2007 Erk <eric.noulard@gmail.com>
>   - Add cmake computed BuildRequires packages
>   - Restore /opt/tsp-x.y.z version prefix install
> * Mon Jan 15 2007 Robert de Vries <R.de.Vries@dutchspace.nl>
>   - Fix package spec
Index: src/scripts/tsp_profile.csh.in
===================================================================
RCS file: /sources/tsp/tsp/src/scripts/tsp_profile.csh.in,v
retrieving revision 1.4
diff -r1.4 tsp_profile.csh.in
2c2
< set TSP_HOME /opt/tsp
---
> set TSP_HOME /opt/tsp-@PACKAGE_VERSION@
Index: src/scripts/tsp_profile.sh.in
===================================================================
RCS file: /sources/tsp/tsp/src/scripts/tsp_profile.sh.in,v
retrieving revision 1.4
diff -r1.4 tsp_profile.sh.in
2c2
< export TSP_HOME=/opt/tsp
---
> export TSP_HOME=/opt/tsp-@PACKAGE_VERSION@
