diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ece78052a..bcb9fd2d7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -263,17 +263,6 @@ ENDIF() # Python find_package(PythonInterp REQUIRED) -# CPack -set(CPACK_PACKAGE_NAME lean) -string(TOLOWER ${CMAKE_SYSTEM_NAME} LOWER_SYSTEM_NAME) -set(CPACK_PACKAGE_FILE_NAME "lean-${LEAN_VERSION_MAJOR}.${LEAN_VERSION_MINOR}.${LEAN_VERSION_PATCH}-${LOWER_SYSTEM_NAME}") -if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - SET(CPACK_GENERATOR TGZ) -else() - SET(CPACK_GENERATOR ZIP) -endif() -include(CPack) - # Examples file(GLOB LEANLIB "${LEAN_SOURCE_DIR}/../examples/*.lean") FOREACH(FILE ${LEANLIB}) @@ -473,3 +462,24 @@ if("${INCLUDE_MSYS2_DLLS}" MATCHES "ON") ${MINGW_LOCAL_DIR}/ninja.exe) install(PROGRAMS ${RUNTIME_LIBRARIES} DESTINATION bin) endif() + +# CPack +set(CPACK_PACKAGE_NAME lean) +set(CPACK_PACKAGE_CONTACT "Leonardo de Moura ") +string(TOLOWER ${CMAKE_SYSTEM_NAME} LOWER_SYSTEM_NAME) +string(TIMESTAMP COMPILE_DATETIME "%Y%m%d%H%M%S") +set(CPACK_PACKAGE_VERSION "${LEAN_VERSION_MAJOR}.${LEAN_VERSION_MINOR}.${LEAN_VERSION_PATCH}.${COMPILE_DATETIME}") +if(NOT (${GIT_SHA1} MATCHES "GITDIR-NOTFOUND")) + set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}.git${GIT_SHA1}") +endif() +set(CPACK_PACKAGE_FILE_NAME "lean-${LEAN_VERSION_MAJOR}.${LEAN_VERSION_MINOR}.${LEAN_VERSION_PATCH}-${LOWER_SYSTEM_NAME}") +if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + SET(CPACK_GENERATOR TGZ) +else() + SET(CPACK_GENERATOR ZIP) +endif() +# CPack -- Debian +SET(CPACK_DEBIAN_PACKAGE_DEPENDS "python") +SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Lean Theorem Prover") +SET(CPACK_DEBIAN_PACKAGE_SECTION "devel") +include(CPack)