Commit c9f1a5f0 authored by saubatn's avatar saubatn
Browse files

FIXED : Clean packaging for Debian Linux distribution and generic information...

FIXED : Clean packaging for Debian Linux distribution and generic information (TODO : Windows NSIS's one, still !).

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@345 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 361d1f6a
......@@ -77,34 +77,6 @@ set(CPACK_SOURCE_IGNORE_FILES
${CPACK_SOURCE_IGNORE_FILES}
)
# There is a "bug"/packaging problem with CMake 2.8.7 and 2.8.8 on ubuntu 12.04
# The package that is produced is corrupted.
# The workaround (see http://cmake.3232098.n2.nabble.com/Creating-package-td7577614.html )
# mkdir tmp
# cp camitk-3.0.0-blue-ubuntu12.04_amd64.deb tmp
# cd tmp
# ar xv camitk-3.0.0-blue-ubuntu12.04_amd64.deb data.tar.gz
# tar xzvf data.tar.gz
# tar zcvf data.tgz ./usr
# mv data.tgz data.tar.gz
# ar rv camitk-3.0.0-blue-ubuntu12.04_amd64.deb data.tar.gz
# SET(CPACK_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_NAME}\n ${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
# Package information
#set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
# set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
# if (UNIX AND NOT WIN32)
# set(CPACK_GENERATOR "DEB") # "RPM")
# else()
# set(CPACK_GENERATOR "NSIS")
# endif()
# set(CPACK_SOURCE_GENERATOR "TGZ" "ZIP" )
# ----------------
......@@ -143,17 +115,6 @@ if (UNIX AND NOT WIN32)
# For Debian-based distribs we want to create DEB packages.
if("${LSB_DISTRIB}" MATCHES "Ubuntu|Debian")
# make_directory(${CMAKE_BINARY_DIR}/packaging/debian)
# set(GTK_UPDATE_ICON_CACHE "gtk-update-icon-cache -f -t ${THEME_DIRECTORY}")
# configure_file( ${CMAKE_SOURCE_DIR}/cmake/debian/postinst.in ${CMAKE_BINARY_DIR}/packaging/debian/postinst )
# configure_file( ${CMAKE_SOURCE_DIR}/cmake/debian/prerm.in ${CMAKE_BINARY_DIR}/packaging/debian/prerm )
#
# set(CPACK_GENERATOR "DEB")
# set(CPACK_DEBIAN_PACKAGE_PRIORITY "extra")
# set(CPACK_DEBIAN_PACKAGE_SECTION "photos")
# set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "")
# set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_BINARY_DIR}/packaging/debian/postinst;${CMAKE_BINARY_DIR}/packaging/debian/prerm;" )
# We need to alter the architecture names as per distro rules
if("${CPACK_PACKAGE_ARCHITECTURE}" MATCHES "i[3-6]86")
set(CPACK_PACKAGE_ARCHITECTURE i386)
......@@ -170,9 +131,6 @@ if (UNIX AND NOT WIN32)
set(CPACK_PACKAGE_DEFAULT_LOCATION "/usr")
set(CPACK_SET_DESTDIR TRUE)
# For building on a different system
# set(LSB_DISTRIB Ubuntu11.10)
# Dependencies depending on the Operating System.
# Ubuntu11.10
if("${LSB_DISTRIB}" MATCHES "Ubuntu11.10")
......@@ -192,7 +150,7 @@ if (UNIX AND NOT WIN32)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libqt4-dev, libinsighttoolkit3.20, libxml2, libvtk5.8-qt4, libxerces-c3.1 ")
endif()
# Debian
# TODO Debian dependencies
# if("${LSB_DISTRIB}" MATCHES "Debian5.*")
# set(CPACK_DEBIAN_PACKAGE_DEPENDS "libgtk2.0-0, libsqlite3-0, libglade2-0, libgegl-0.0-0, libcairo2, libexiv2-5, liblcms1, libjpeg62, libpng12-0, liblensfun0, liblensfun-data")
#
......@@ -211,66 +169,6 @@ if (UNIX AND NOT WIN32)
string(TOLOWER "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${CAMITK_VER_NICKNAME}-${LSB_DISTRIB}_${CPACK_PACKAGE_ARCHITECTURE}" CPACK_PACKAGE_FILE_NAME)
message(STATUS "CPACK_PACKAGE_FILE_NAME = ${CPACK_PACKAGE_FILE_NAME}")
#set(CPACK_INSTALL_CMAKE_PROJECTS "???"
# information description
# set(CPACK_PACKAGE_DESCRIPTION_FILE "${CAMITK_SOURCE_DIR}/README")
# set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CamiTK") #. Computer Assisted Medical Intervention Took Kit.")
# CamiTK is a C++ framework that helps researchers and clinicians to easily and rapidly collaborate in order to prototype CAMI applications, that feature medical images, surgical navigation and biomechanical simulations.")
# SET(CPACK_PACKAGE_DESCRIPTION "CamiTK is a C++ framework that helps researchers and clinicians to easily and rapidly collaborate in order to prototype CAMI applications, that feature medical images, surgical navigation and biomechanical simulations.")
# if(DPKG_FOUND)
# set(CPACK_PACKAGING_INSTALL_PREFIX "/usr")
# set(CPACK_PACKAGE_DEFAULT_LOCATION "/usr")
# set(CPACK_DEBIAN_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
# set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
# set(CPACK_SET_DESTDIR TRUE)
# #set(CPACK_INSTALLED_DIRECTORIES "${CAMITK_INSTALL_ROOT}/include" "usr/include")
# set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386) # Change to your architecture here, there is no such thing as i686 in deb!
# # TODO update list of dependencies
# message(STATUS "Variable LSB_DISTRIB = ${LSB_DISTRIB} ")
# # For Ubuntu10.04
# if("${LSB_DISTRIB}" MATCHES "Ubuntu10.04")
# set(CPACK_DEBIAN_PACKAGE_DEPENDS "libinsighttoolkit3.16 ( >= 3.16.0-1 ), libxml2, libvtk5.2-qt4")
# endif("${LSB_DISTRIB}" MATCHES "Ubuntu10.04")
# # For Ubuntu10.10
# if("${LSB_DISTRIB}" MATCHES "Ubuntu10.10")
# set(CPACK_DEBIAN_PACKAGE_DEPENDS "libinsighttoolkit3.18, libxml2, libvtk5.4-qt4")
# endif("${LSB_DISTRIB}" MATCHES "Ubuntu10.10")
# # For Ubuntu11.04
# if("${LSB_DISTRIB}" MATCHES "Ubuntu11.04")
# set(CPACK_DEBIAN_PACKAGE_DEPENDS "libinsighttoolkit3.18, libxml2, libvtk5.4-qt4 ")
# endif("${LSB_DISTRIB}" MATCHES "Ubuntu11.04")
# # For Ubuntu11.04
#
# endif()
# # -------------
# # RPM packages
# # -------------
# # TODO test rpm packaging
# find_program(RPMBUILD
# NAMES rpmbuild
# PATHS "/usr/bin"
# )
#
# if ( RPMBUILD )
# get_filename_component(RPMBUILD_PATH ${RPMBUILD} ABSOLUTE)
# message(STATUS "Packaging rpm using ${RPMBUILD_PATH}: OK")
# set(RPMBUILD_FOUND "YES")
# else ()
# SET(RPMBUILD_FOUND "NO")
# endif()
#
# if(RPMBUILD_FOUND AND NOT WIN32)
# set(CPACK_SET_DESTDIR TRUE)
# endif(RPMBUILD_FOUND AND NOT WIN32)
endif()
......@@ -295,76 +193,48 @@ if(WIN32 AND NOT UNIX)
# NSIS Windows installer
message(STATUS "Packaging nsis using ${MAKENSIS}")
# IMPORTANT !!!
# There is a bug in NSI that does not handle full unix paths properly. Make
# sure there is at least one set of four (4) backslashes.
# include(GetPrerequisites)
# set(TARGET_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug)
# set(PREREQ "")
# get_prerequisites(${CAMITK_BIN_DIR}/Debug/imp.exe PREREQ 1 1 ${CAMITK_BIN_DIR} ${VTK_LIBRARY_DIRS}/Release)
# get_prerequisites(${TARGET_DIR}/${EXECNAME}.exe" PREREQ 0 1 ${TARGET_DIR} "")
# Get the list of shared library files required by <target>. The list
# in the variable named <prerequisites_var> should be empty on first
# entry to this function. On exit, <prerequisites_var> will contain the
# list of required shared library files.
# <target> is the full path to an executable file. <prerequisites_var>
# is the name of a CMake variable to contain the results.
# <exclude_system> must be 0 or 1 indicating whether to include or
# exclude "system" prerequisites. If <recurse> is set to 1 all
# prerequisites will be found recursively, if set to 0 only direct
# prerequisites are listed. <exepath> is the path to the top level
# executable used for @executable_path replacment on the Mac. <dirs> is
# a list of paths where libraries might be found: these paths are
# searched first when a target without any path info is given. Then
# standard system locations are also searched: PATH, Framework
# locations, /usr/lib...
#message(STATUS "PREREQ=${PREREQ}")
#set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${PREREQ})
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
##TODO use GetPrerequisites.cmake (i.e. find a better way to list dependencies)
##get_prerequisites() is not well enough documented to justify the time investement - EP May 2011
${QT_BINARY_DIR}/QtCore4.dll
${QT_BINARY_DIR}/QtGui4.dll
${QT_BINARY_DIR}/QtSvg4.dll
${QT_BINARY_DIR}/QtXml4.dll
${QT_BINARY_DIR}/QtNetwork4.dll
${QT_BINARY_DIR}/QtSql4.dll
${QT_BINARY_DIR}/QtWebKit4.dll
${VTK_LIBRARY_DIRS}/Release/QVTK.dll
${VTK_LIBRARY_DIRS}/Release/vtkCommon.dll
${VTK_LIBRARY_DIRS}/Release/vtksys.dll
${VTK_LIBRARY_DIRS}/Release/vtkFiltering.dll
${VTK_LIBRARY_DIRS}/Release/vtkGraphics.dll
${VTK_LIBRARY_DIRS}/Release/vtkHybrid.dll
${VTK_LIBRARY_DIRS}/Release/vtkIO.dll
${VTK_LIBRARY_DIRS}/Release/vtkImaging.dll
${VTK_LIBRARY_DIRS}/Release/vtkRendering.dll
${VTK_LIBRARY_DIRS}/Release/vtkVolumeRendering.dll
${VTK_LIBRARY_DIRS}/Release/vtkverdict.dll
${VTK_LIBRARY_DIRS}/Release/vtkDICOMParser.dll
${VTK_LIBRARY_DIRS}/Release/vtkNetCDF.dll
${VTK_LIBRARY_DIRS}/Release/vtkNetCDF_cxx.dll
# ${VTK_LIBRARY_DIRS}/Release/vtkmesh.dll
${VTK_LIBRARY_DIRS}/Release/vtkexpat.dll
${VTK_LIBRARY_DIRS}/Release/vtkjpeg.dll
${VTK_LIBRARY_DIRS}/Release/vtkmetaio.dll
${VTK_LIBRARY_DIRS}/Release/vtkpng.dll
${VTK_LIBRARY_DIRS}/Release/vtktiff.dll
${VTK_LIBRARY_DIRS}/Release/vtkzlib.dll
${VTK_LIBRARY_DIRS}/Release/vtkInfovis.dll
# ${VTK_LIBRARY_DIRS}/Release/vtkQtChart.dll
${VTK_LIBRARY_DIRS}/Release/vtkfreetype.dll
${VTK_LIBRARY_DIRS}/Release/vtkftgl.dll
${VTK_LIBRARY_DIRS}/Release/vtkalglib.dll
${VTK_LIBRARY_DIRS}/Release/vtklibxml2.dll
${VTK_LIBRARY_DIRS}/Release/vtkViews.dll
${VTK_LIBRARY_DIRS}/Release/vtkexoIIc.dll
${VTK_LIBRARY_DIRS}/Release/vtkWidgets.dll
# Wizard dependencies
${XERCESC_ROOT_DIR}/bin/xerces-c_3_1.dll
set(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS
##TODO use GetPrerequisites.cmake (i.e. find a better way to list dependencies)
##get_prerequisites() is not well enough documented to justify the time investement - EP May 2011
${QT_BINARY_DIR}/QtCore4.dll
${QT_BINARY_DIR}/QtGui4.dll
${QT_BINARY_DIR}/QtSvg4.dll
${QT_BINARY_DIR}/QtXml4.dll
${QT_BINARY_DIR}/QtNetwork4.dll
${QT_BINARY_DIR}/QtSql4.dll
${QT_BINARY_DIR}/QtWebKit4.dll
${VTK_LIBRARY_DIRS}/Release/QVTK.dll
${VTK_LIBRARY_DIRS}/Release/vtkCommon.dll
${VTK_LIBRARY_DIRS}/Release/vtksys.dll
${VTK_LIBRARY_DIRS}/Release/vtkFiltering.dll
${VTK_LIBRARY_DIRS}/Release/vtkGraphics.dll
${VTK_LIBRARY_DIRS}/Release/vtkHybrid.dll
${VTK_LIBRARY_DIRS}/Release/vtkIO.dll
${VTK_LIBRARY_DIRS}/Release/vtkImaging.dll
${VTK_LIBRARY_DIRS}/Release/vtkRendering.dll
${VTK_LIBRARY_DIRS}/Release/vtkVolumeRendering.dll
${VTK_LIBRARY_DIRS}/Release/vtkverdict.dll
${VTK_LIBRARY_DIRS}/Release/vtkDICOMParser.dll
${VTK_LIBRARY_DIRS}/Release/vtkNetCDF.dll
${VTK_LIBRARY_DIRS}/Release/vtkNetCDF_cxx.dll
# ${VTK_LIBRARY_DIRS}/Release/vtkmesh.dll
${VTK_LIBRARY_DIRS}/Release/vtkexpat.dll
${VTK_LIBRARY_DIRS}/Release/vtkjpeg.dll
${VTK_LIBRARY_DIRS}/Release/vtkmetaio.dll
${VTK_LIBRARY_DIRS}/Release/vtkpng.dll
${VTK_LIBRARY_DIRS}/Release/vtktiff.dll
${VTK_LIBRARY_DIRS}/Release/vtkzlib.dll
${VTK_LIBRARY_DIRS}/Release/vtkInfovis.dll
# ${VTK_LIBRARY_DIRS}/Release/vtkQtChart.dll
${VTK_LIBRARY_DIRS}/Release/vtkfreetype.dll
${VTK_LIBRARY_DIRS}/Release/vtkftgl.dll
${VTK_LIBRARY_DIRS}/Release/vtkalglib.dll
${VTK_LIBRARY_DIRS}/Release/vtklibxml2.dll
${VTK_LIBRARY_DIRS}/Release/vtkViews.dll
${VTK_LIBRARY_DIRS}/Release/vtkexoIIc.dll
${VTK_LIBRARY_DIRS}/Release/vtkWidgets.dll
# Wizard dependencies
${XERCESC_ROOT_DIR}/bin/xerces-c_3_1.dll
)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment