ubuntu package settings

This commit is contained in:
Matthias Hochsteger 2015-11-02 17:31:23 +01:00
parent 11ac6c704a
commit 546cf02dbe
2 changed files with 9 additions and 4 deletions

View File

@ -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 <matthias.hochsteger@tuwien.ac.at>)
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Matthias Hochsteger <matthias.hochsteger@tuwien.ac.at>")
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)

View File

@ -1,2 +1,2 @@
#cmakedefine HAVE_DLFCN_H 1
#define PACKAGE_VERSION "${PACKAGE_VERSION}"
#define PACKAGE_VERSION "${NETGEN_VERSION}"