WIP revamp Debian packaging
This commit is contained in:
parent
6995a21a42
commit
ec1cb5cca3
1 changed files with 26 additions and 101 deletions
|
@ -1,96 +1,50 @@
|
|||
##########################################################################################
|
||||
# Settings that are common to all target systems.
|
||||
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
SET(CPACK_SYSTEM_NAME "win32")
|
||||
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
SET(CPACK_SYSTEM_NAME "macos")
|
||||
ELSE()
|
||||
SET(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
|
||||
ENDIF()
|
||||
|
||||
SET(INTERNAL_NAME "speed-dreams")
|
||||
|
||||
SET(CPACK_PACKAGE_NAME "Speed Dreams")
|
||||
SET(CPACK_PACKAGE_VENDOR "The Speed Dreams team")
|
||||
SET(CPACK_PACKAGE_CONTACT "https://sourceforge.net/projects/speed-dreams/")
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Speed Dreams (an Open Motorsport Sim) is a racing simulation that allows you to drive in races against opponents simulated by the computer ; it is GPL 2+ and has been forked from TORCS in late 2008")
|
||||
SET(CPACK_RESOURCE_FILE_LICENSE "${SOURCE_DIR}/COPYING.txt")
|
||||
SET(CPACK_RESOURCE_FILE_README "${SOURCE_DIR}/README.txt")
|
||||
|
||||
SET(EXECUTABLE_NAME "${INTERNAL_NAME}-2")
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "${EXECUTABLE_NAME};Start ${CPACK_PACKAGE_NAME}")
|
||||
|
||||
# Version settings.
|
||||
# * the short way.
|
||||
#SET(CPACK_PACKAGE_VERSION "${VERSION_LONG}")
|
||||
|
||||
# * another way.
|
||||
SET(CPACK_PACKAGE_NAME "${INTERNAL_NAME}")
|
||||
SET(CPACK_PACKAGE_VENDOR "The Speed Dreams Team")
|
||||
SET(CPACK_PACKAGE_CONTACT "The Speed Dreams Team <https://forge.a-lec.org/speed-dreams>")
|
||||
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
|
||||
SET(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
|
||||
SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}${PROJECT_VERSION_METADATA}")
|
||||
IF(NOT SVN_FIND_REV_FAILED)
|
||||
SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}-r${SVN_REV}")
|
||||
ENDIF(NOT SVN_FIND_REV_FAILED)
|
||||
|
||||
# Binary package settings.
|
||||
SET(PACKAGE_FILE_PREFIX "${INTERNAL_NAME}")
|
||||
#SET(CPACK_OUTPUT_CONFIG_FILE "/home/andy/vtk/CMake-bin/CPackConfig.cmake")
|
||||
#SET(CPACK_PACKAGE_DESCRIPTION_FILE "/home/andy/vtk/CMake/Copyright.txt")
|
||||
|
||||
#SET(CPACK_IGNORE_FILES "/\\.svn/;\\.swp$;\\.#;/#;${CPACK_IGNORE_FILES}")
|
||||
|
||||
# Source package settings.
|
||||
#SET(CPACK_SOURCE_OUTPUT_CONFIG_FILE "/home/andy/vtk/CMake-bin/CPackSourceConfig.cmake")
|
||||
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${PACKAGE_FILE_PREFIX}-${CPACK_PACKAGE_VERSION}-src")
|
||||
|
||||
#SET(CPACK_RESOURCE_FILE_LICENSE "/home/andy/vtk/CMake/Copyright.txt")
|
||||
#SET(CPACK_RESOURCE_FILE_README "/home/andy/vtk/CMake/Templates/CPack.GenericDescription.txt")
|
||||
#SET(CPACK_RESOURCE_FILE_WELCOME "/home/andy/vtk/CMake/Templates/CPack.GenericWelcome.txt")
|
||||
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "speed-dreams-data(>= ${data_version})")
|
||||
SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION
|
||||
"Free and open source motorsport simulator
|
||||
Speed Dreams is a free and open source motorsport simulator. Originally a
|
||||
fork of the TORCS project, it has evolved into a higher level of maturity,
|
||||
featuring realistic physics with tens of high-quality cars and tracks to
|
||||
choose from.
|
||||
|
||||
SET(CPACK_SOURCE_IGNORE_FILES
|
||||
"/installer/" "/doc/design/" "/doc/develdoc" "/doc/website/" "/_CPack_Packages/"
|
||||
"/CMakeCache\\\\.txt$" "/install_manifest\\\\.txt$" "/xmlversion_loc\\\\.txt$"
|
||||
"/config\\\\.h$" "/version\\\\.h$" "/doxygen_config$"
|
||||
"/\\\\.svn/" "/\\\\.dir/" "/CMakeFiles/"
|
||||
"cmake_install\\\\.cmake$" "CPackConfig\\\\.cmake$" "CPackSourceConfig\\\\.cmake$"
|
||||
"\\\\.bak$" "\\\\.flc$" "#.*#$" "~$" "\\\\.~.*"
|
||||
"\\\\.xcf$" "\\\\.xcf\\\\.bz2$" "\\\\.psd$"
|
||||
"\\\\.exe$" "/sd2-.*$" "/speed-dreams-2$" "/xmlversion$"
|
||||
"\\\\.zip$" "\\\\.tar\\\\.bz2$" "\\\\.tar\\\\.gz$" "\\\\.tar\\\\.Z$" "\\\\.tar\\\\.7z$")
|
||||
Speed Dreams features multiple categories from all racing eras (36GP
|
||||
and 67GP, Supercars, Long Day Series 1/2, and many more), 4
|
||||
computer-controlled driver implementations, flexible race configuration
|
||||
(real-time weather conditions, multi-class races, etc.), as well as a
|
||||
master server to compare your best lap times against other players.
|
||||
|
||||
##########################################################################################
|
||||
# Put Linux install information here
|
||||
IF(UNIX AND NOT APPLE)
|
||||
This package contains the engine and tools binaries."
|
||||
)
|
||||
|
||||
SET(PACKAGERS_BINARY "DEB" CACHE STRING "CPack binary package generators to use (separated with ';', among DEB, RPM, STGZ, TGZ, TBZ2, TZ, ZIP)")
|
||||
MARK_AS_ADVANCED(PACKAGERS_BINARY)
|
||||
SET(PACKAGERS_SOURCE "TBZ2" CACHE STRING "CPack source package generators to use (separated with ';', among TGZ, TBZ2, TZ, ZIP)")
|
||||
MARK_AS_ADVANCED(PACKAGERS_SOURCE)
|
||||
SET(EXECUTABLE_NAME "${PROJECT_NAME}")
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "${EXECUTABLE_NAME};Start ${CPACK_PACKAGE_NAME}")
|
||||
|
||||
SET(CPACK_PACKAGE_NAME ${PACKAGE_FILE_PREFIX} CACHE STRING "" FORCE)
|
||||
|
||||
# On debian, auto-detect dependencies
|
||||
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||
# Or manually set the dependencies
|
||||
# from Linux Mint 20 (Ubuntu 20.04)
|
||||
#SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.29), libcurl4 (>= 7.16.2), libenet7, libexpat1 (>= 2.0.1), libgcc-s1 (>= 3.0), libglu1-mesa | libglu1, libglx0, libjpeg8 (>= 8c), libopenal1 (>= 1.14), libopengl0, libopenscenegraph160, libopenthreads21, libplib1, libpng16-16 (>= 1.6.2-1), libsdl2-2.0-0 (>= 2.0.10), libsdl2-mixer-2.0-0 (>= 2.0.2), libstdc++6 (>= 9), zlib1g (>= 1:1.1.4)")
|
||||
|
||||
# This causes package name to have undersocres connecting the name, version, and arch
|
||||
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
|
||||
|
||||
# Put other Debian-based distros settings here.
|
||||
|
||||
# Source package specific settings.
|
||||
LIST(APPEND CPACK_SOURCE_IGNORE_FILES "Makefile$" "\\\\.so$")
|
||||
|
||||
ENDIF(UNIX AND NOT APPLE)
|
||||
|
||||
##########################################################################################
|
||||
# Put Windows install information here.
|
||||
# (NSIS must be installed on your computer for this to work)
|
||||
IF(WIN32)
|
||||
IF(CPACK_GENERATOR STREQUAL "NSIS")
|
||||
# (NSIS must be installed on your computer for this to work)
|
||||
|
||||
# General note: 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) backlasshes.
|
||||
|
@ -101,11 +55,6 @@ IF(WIN32)
|
|||
|
||||
SET(EXECUTABLE_PATHNAME "$INSTDIR\\\\bin\\\\${EXECUTABLE_NAME}.exe")
|
||||
|
||||
SET(PACKAGERS_BINARY "NSIS" CACHE STRING "CPack binary package generators to use (separated with ';', among NSIS, CygwinBinary, STGZ, TGZ, TBZ2, TZ, ZIP)")
|
||||
MARK_AS_ADVANCED(PACKAGERS_BINARY)
|
||||
SET(PACKAGERS_SOURCE "ZIP" CACHE STRING "CPack source package generators to use (separated with ';', among TGZ, TBZ2, TZ, ZIP)")
|
||||
MARK_AS_ADVANCED(PACKAGERS_SOURCE)
|
||||
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${PACKAGE_FILE_PREFIX}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}-setup")
|
||||
SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}${PROJECT_VERSION_METADATA}")
|
||||
SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION_MAJOR}")
|
||||
|
@ -181,32 +130,15 @@ IF(WIN32)
|
|||
ENDIF(OPTION_TRACKEDITOR)
|
||||
|
||||
|
||||
# Source package specific settings.
|
||||
LIST(APPEND CPACK_SOURCE_IGNORE_FILES
|
||||
"/VTune/"
|
||||
"/Release/" "/Debug/" "/RelWithDebInfo/" "/MinSizeRel/"
|
||||
"/release/" "/debug/" "/relwithdebinfo/" "/minsizerel/"
|
||||
"\\\\.sln$" "\\\\.suo$" "\\\\.ncb$" "\\\\.vcproj*$" "\\\\.dll$")
|
||||
|
||||
# Add the PACKAGE_SRC project in the MSVC solution
|
||||
# (CMake 2.6 and 2.8 fail to do this itself).
|
||||
#ADD_CUSTOM_TARGET(PACKAGE_SRC)
|
||||
#ADD_CUSTOM_COMMAND(TARGET PACKAGE_SRC
|
||||
# COMMAND ${CMAKE_CPACK_COMMAND} -C $(OutDir) --config ./CPackSourceConfig.cmake)
|
||||
|
||||
ENDIF(WIN32)
|
||||
|
||||
##########################################################################################
|
||||
# Put Mac OS X install information here
|
||||
IF(APPLE)
|
||||
|
||||
SET(PACKAGERS_BINARY "DragNDrop" CACHE STRING "CPack binary package generators to use (separated with ';', among Bundle, DragNDrop, PackageMaker, OSXX11, STGZ, TGZ, TBZ2, TZ, ZIP)")
|
||||
MARK_AS_ADVANCED(PACKAGERS_BINARY)
|
||||
SET(PACKAGERS_SOURCE "TBZ2" CACHE STRING "CPack source package generators to use (separated with ';', among TGZ, TBZ2, TZ, ZIP)")
|
||||
MARK_AS_ADVANCED(PACKAGERS_SOURCE)
|
||||
ELSEIF(CPACK_GENERATOR STREQUAL "DragNDrop")
|
||||
|
||||
# Source package specific settings.
|
||||
LIST(APPEND CPACK_SOURCE_IGNORE_FILES "Makefile$")
|
||||
SET(CPACK_INSTALLED_DIRECTORIES "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX};${CMAKE_INSTALL_PREFIX}")
|
||||
SET(CPACK_INSTALL_CMAKE_PROJECTS "")
|
||||
SET(CPACK_DMG_DS_STORE "${CMAKE_SOURCE_DIR}/packaging/OSX/DS_Store-full")
|
||||
|
@ -253,11 +185,4 @@ IF(APPLE)
|
|||
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/packaging/OSX/createbaseapp.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/createbaseapp.cmake" @ONLY)
|
||||
|
||||
ENDIF(APPLE)
|
||||
|
||||
##########################################################################################
|
||||
# Final settings.
|
||||
SET(CPACK_GENERATOR ${PACKAGERS_BINARY})
|
||||
SET(CPACK_SOURCE_GENERATOR ${PACKAGERS_SOURCE})
|
||||
|
||||
#INCLUDE(CPack)
|
||||
ENDIF()
|
||||
|
|
Loading…
Reference in a new issue