Commit 942f4504 authored by Pierre Aubert's avatar Pierre Aubert
Browse files

Update create linux package

parent 7607ff06
......@@ -22,4 +22,5 @@ endif(SELF_TESTS_MODE)
set(PHOENIX_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src;${PHOENIX_INCLUDE_DIRS}" CACHE INTERNAL "list of Phoenix include dirs")
createLinuxPackages()
......@@ -9,3 +9,5 @@ if(NOT MODULE_MODE)
include(create_find_project.cmake)
endif()
include(createLinuxPackages.cmake)
# Commands to create debian package with cmake
set(CPACK_PACKAGE_NAME "${PROGRAM_NAME}")
set(CPACK_PACKAGE_VERSION "${PROGRAM_VERSION}")
set(CPACK_PACKAGE_VENDOR "Pierre Aubert")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${PROGRAM_DESCRIPTION_NO_QUOTE})
set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README.md)
set(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_SOURCE_DIR}/README.md)
set(CPACK_PACKAGE_HOMEPAGE_URL ${PROGRAM_HOMEPAGE})
set(CPACK_PACKAGE_CONTACT "pierre.aubert@lapp.in2p3.fr")
set(CPACK_PACKAGE_ICON ${CMAKE_SOURCE_DIR}/doc/icon.bmp)
set(CPACK_PACKAGE_DESCRIPTION ${PROGRAM_DESCRIPTION_NO_QUOTE})
if(CREATE_DEB) #Ok for UBUNTU
set(CPACK_GENERATOR "DEB")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "pierre.aubert@lapp.in2p3.fr") #required
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${PROGRAM_HOMEPAGE}) #For the debian installer only
set(CPACK_DEBIAN_PACKAGE_DEPENDS "")
endif(CREATE_DEB)
if(CREATE_RPM) #Need to install rmp package on ubuntu which contains rpmbuild
set(CPACK_GENERATOR "RPM")
set(CPACK_RPM_PACKAGE_AUTOREQ "NO")
set(CPACK_RPM_PACKAGE_REQUIRES "")
endif(CREATE_RPM)
# if(CREATE_DMG) #We should use DragNDrop or PackageMaker of osx
# set(CPACK_GENERATOR "DMG")
# endif(CREATE_DMG)
include(CPack)
# Has to be used :
# cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCREATE_DEB=yes -DSSE4.2=yes # Or whatever extension
# make -j 8
# cpack
function(createLinuxPackages)
if(NOT MODULE_MODE)
set(CPACK_PACKAGE_NAME "${PROGRAM_NAME}" CACHE STRING "Name of the program")
set(CPACK_PACKAGE_VERSION "${PROGRAM_VERSION}" CACHE STRING "Version of the program")
set(CPACK_PACKAGE_VENDOR "Pierre Aubert" CACHE STRING "Vendor of the program")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${PROGRAM_DESCRIPTION_NO_QUOTE} CACHE STRING "Description of the program")
set(CPACK_RESOURCE_FILE_README ${CMAKE_SOURCE_DIR}/README.md CACHE STRING "DOC of the program")
set(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_SOURCE_DIR}/README.md CACHE STRING "Welcome of the program")
set(CPACK_PACKAGE_HOMEPAGE_URL ${PROGRAM_HOMEPAGE} CACHE STRING "Homepage of the program")
set(CPACK_PACKAGE_CONTACT "pierre.aubert@lapp.in2p3.fr" CACHE STRING "Contact of the program")
set(CPACK_PACKAGE_ICON ${CMAKE_SOURCE_DIR}/doc/icon.bmp CACHE STRING "Icon of the program")
set(CPACK_PACKAGE_DESCRIPTION ${PROGRAM_DESCRIPTION_NO_QUOTE} CACHE STRING "Desription with quote of the program")
if(CREATE_DEB) #Ok for UBUNTU
set(CPACK_GENERATOR "DEB" CACHE STRING "Package type of the program")
set(CPACK_DEBIAN_PACKAGE_VERSION "${PROGRAM_VERSION}" CACHE STRING "Version of the program")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "pierre.aubert@lapp.in2p3.fr" CACHE STRING "Package maintainer of the program") #required
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${PROGRAM_HOMEPAGE} CACHE STRING "Homepage of the program") #For the debian installer only
set(CPACK_DEBIAN_PACKAGE_DEPENDS "" CACHE STRING "Depends of the program")
endif(CREATE_DEB)
if(CREATE_RPM) #Need to install rmp package on ubuntu which contains rpmbuild
set(CPACK_GENERATOR "RPM" CACHE STRING "Package type of the program")
set(CPACK_RPM_PACKAGE_AUTOREQ "NO" CACHE STRING "Caracteristics of the program")
set(CPACK_RPM_PACKAGE_REQUIRES "" CACHE STRING "Depends of the program")
endif(CREATE_RPM)
# if(CREATE_DMG) #We should use DragNDrop or PackageMaker of osx
# set(CPACK_GENERATOR "DMG")
# endif(CREATE_DMG)
include(CPack)
# Has to be used :
# cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCREATE_DEB=yes -DSSE4.2=yes # Or whatever extension
# make -j 8
# cpack
endif()
endfunction(createLinuxPackages)
Markdown is supported
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