From 546cf02dbe7bc752c07a1478e5d3573cb7601a3e Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Mon, 2 Nov 2015 17:31:23 +0100 Subject: [PATCH] ubuntu package settings --- CMakeLists.txt | 11 ++++++++--- config.h.cmake | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7722afc2..4815d289 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,8 +6,11 @@ cmake_minimum_required(VERSION 2.8.9) project(Netgen) set(NETGEN_VERSION_MAJOR 6) set(NETGEN_VERSION_MINOR 1) +string(TIMESTAMP NETGEN_VERSION_PATCH "%y%U%w" ) set(NETGEN_VERSION "${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}-dev") -set(PACKAGE_VERSION "${NETGEN_VERSION}") +set(PACKAGE_VERSION "${NETGEN_VERSION_MAJOR}.${NETGEN_VERSION_MINOR}-${NETGEN_VERSION_PATCH}") +set(CPACK_PACKAGE_VERSION "${PACKAGE_VERSION}") +# set(CPACK_DEBIAN_PACKAGE_VERSION "${PACKAGE_VERSION}" if(NOT WIN32) option( USE_NATIVE_ARCH "build which -march=native" ON) @@ -280,6 +283,7 @@ set(CPACK_PACKAGE_DESCRIPTION "NETGEN is an automatic 3d tetrahedral mesh genera if(UNIX) set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/netgen") execute_process(COMMAND grep CODENAME /etc/lsb-release OUTPUT_VARIABLE temp OUTPUT_STRIP_TRAILING_WHITESPACE) + execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE) if(temp) set(CPACK_GENERATOR "DEB") string(SUBSTRING ${temp} 17 -1 UBUNTU_VERSION) @@ -288,13 +292,14 @@ if(UNIX) set(BOOST_PACKAGE "libboost-python${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}") set(CPACK_DEBIAN_PACKAGE_DEPENDS "python3, ${BOOST_PACKAGE}, libtk8.5, libtcl8.5, tix, libxmu6") execute_process(COMMAND dpkg --print-architecture OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE) - set(CPACK_DEBIAN_PACKAGE_MAINTAINER Matthias Hochsteger ) + set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Matthias Hochsteger ") if(USE_MPI) set(CPACK_DEBIAN_PACKAGE_DEPENDS "${CPACK_DEBIAN_PACKAGE_DEPENDS}, libmetis5, openmpi-bin") set(CPACK_PACKAGE_NAME "${CPACK_PACKAGE_NAME}_mpi") endif(USE_MPI) set(CPACK_DEBIAN_PACKAGE_SECTION Science) - set(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}) + set(CPACK_DEBIAN_PACKAGE_NAME ${CPACK_PACKAGE_NAME}) + set(CPACK_PACKAGE_FILE_NAME "netgen-${PACKAGE_VERSION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}") endif(temp) include(CPack) endif(UNIX) diff --git a/config.h.cmake b/config.h.cmake index 179e3fbd..7dfa079d 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -1,2 +1,2 @@ #cmakedefine HAVE_DLFCN_H 1 -#define PACKAGE_VERSION "${PACKAGE_VERSION}" +#define PACKAGE_VERSION "${NETGEN_VERSION}"