Commit f99c0309 authored by Praetorius, Simon's avatar Praetorius, Simon

templates for debian packaging added

parent 1e0015b3
2004-2007 Simon Vey
2007-2012 Thomas Witkowski
2008-2013 Peter Gottschling <peter.gottschling@simunova.com>
2008-2016 Rainer Backofen <rainer.backofen@tu-dresden.de>
2009-2016 Andreas Naumann <andreas.naumann@tu-dresden.de>
2010-2016 Simon Praetorius <simon.praetorius@tu-dresden.de>
2014-2016 Siqi Ling <lsq0473@gmail.com>
\ No newline at end of file
amdis (1.1~rc1-1) UNRELEASED; urgency=medium
* CMake configuration redesigned
* ARH3 reader corrected to parse .parh files correctly
* Macro DEBUG removed in favor of NDEBUG
* Compatibility with PETSc version 3.7
* Functor expressions with arbitrary nr. of arguments
* Reimplementation of periodic boundary conditions
* build scripts for linux and windows
* DirichletBC accepting expressions as value
* Resenbrock time-discretization in parallel
-- Simon Praetorius <simon.praetorius@tu-dresden.de> Mon, 31 Oct 2016 10:46:58 +0100
\ No newline at end of file
#! /bin/bash
ROOT=${PWD}
POSTFIX="par_rel"
CONFIURATION="Release"
if [ "$1" == "Debug" ]; then
POSTFIX="par_dbg"
CONFIURATION="Debug"
fi
# at first build AMDiS
cmake -E make_directory ${ROOT}/build_${POSTFIX}
cmake -E chdir ${ROOT}/build_${POSTFIX} cmake \
-DCMAKE_INSTALL_PREFIX=${ROOT}/install_${POSTFIX} \
-DCMAKE_BUILD_TYPE=${CONFIURATION} \
-DENABLE_CXX11:BOOL=ON \
-DENABLE_COMPRESSION:BOOL=OFF \
-DENABLE_UMFPACK:BOOL=OFF \
-DENABLE_EXTENSIONS:BOOL=ON \
-DENABLE_PARALLEL_DOMAIN:BOOL=ON \
${ROOT}/AMDiS
cmake --build ${ROOT}/build_${POSTFIX} --target install -- -j4
# now build the demos
BASEDIR=${ROOT}/demo
cmake -E make_directory ${BASEDIR}/build_${POSTFIX}
cmake -E chdir ${BASEDIR}/build_${POSTFIX} cmake \
-DAMDIS_DIR=${ROOT}/install_${POSTFIX}/share/amdis \
-DCMAKE_BUILD_TYPE=${CONFIURATION} \
-DCOMPONENT=PARALLEL \
${BASEDIR}
cmake --build ${BASEDIR}/build_${POSTFIX}
# now build and run the test_suite
BASEDIR=${ROOT}/test
cmake -E make_directory ${BASEDIR}/build_${POSTFIX}
cmake -E chdir ${BASEDIR}/build_${POSTFIX} cmake \
-DAMDIS_DIR=${ROOT}/install_${POSTFIX}/share/amdis \
-DCMAKE_BUILD_TYPE=${CONFIURATION} \
-DCOMPONENT=PARALLEL \
${BASEDIR}
cmake --build ${BASEDIR}/build_${POSTFIX}
cmake --build ${BASEDIR}/build_${POSTFIX} --target test
set(CPACK_PACKAGE_NAME "@PACKAGE_NAME@")
set(CPACK_PACKAGE_VERSION "1.1~rc1")
SET(CPACK_PACKAGE_VERSION_MAJOR "1")
SET(CPACK_PACKAGE_VERSION_MINOR "1")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
set(CPACK_PACKAGE_CONTACT "Simon Praetorius <simon.praetorius@tu-dresden.de>")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A C++ library to solve a broad class of PDEs using adaptive finite elements.")
set(CPACK_PACKAGE_DESCRIPTION_FILE "@CMAKE_SOURCE_DIR@/README.md")
set(CPACK_PACKAGE_DESCRIPTION "Adaptive MultiDimensional Simulations (AMDiS) is a C++ library
to solve a broad class of partial differential equations (PDEs) using
adaptive finite elements.")
set(CPACK_RESOURCE_FILE_LICENSE "@CMAKE_SOURCE_DIR@/LICENSE")
set(CPACK_RESOURCE_FILE_README "@CMAKE_SOURCE_DIR@/README.md")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
# Command line arguments:
# CONFIG = [Debug|Release]
# COMPONENT = [SEQUENTIAL|PARALLEL]
set(PACKAGE_NAME "libamdis")
if ("${COMPONENT}" STREQUAL "PARALLEL")
set(PACKAGE_NAME "${PACKAGE_NAME}-par")
set(ADDITIONAL_FLAGS "-DENABLE_UMFPACK:BOOL=OFF -DENABLE_PARALLEL_DOMAIN:BOOL=ON")
else ()
set(ADDITIONAL_FLAGS "-DENABLE_UMFPACK:BOOL=ON")
endif ()
if ("${CONFIG}" STREQUAL "Debug")
set(PACKAGE_NAME "${PACKAGE_NAME}-dbg")
set(PACKAGE_SECTION "debug")
else ()
set(PACKAGE_SECTION "misc")
endif ()
# set(PACKAGE_NAME "${PACKAGE_NAME}-dev")
set(IN_DIR ${CMAKE_SOURCE_DIR}/tools/packaging/debian)
set(OUT_DIR ${CMAKE_SOURCE_DIR}/debian_package)
file(MAKE_DIRECTORY ${OUT_DIR})
configure_file(${IN_DIR}/CPackOptions.cmake.in ${OUT_DIR}/CPackOptions.cmake @ONLY)
include(${OUT_DIR}/CPackOptions.cmake)
set(PACKAGE_FILENAME ${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION})
set(PACKAGE_PREFIX ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION})
set(TGZ_FILENAME ${OUT_DIR}/${PACKAGE_FILENAME}.orig.tar.gz)
execute_process(COMMAND git archive --format=tar.gz --prefix ${PACKAGE_PREFIX}/ -o ${TGZ_FILENAME} master)
execute_process(COMMAND date +%F OUTPUT_VARIABLE CURRENT_DATE)
execute_process(COMMAND date +%Y OUTPUT_VARIABLE YEAR)
set(PACKAGE_VERSION ${CPACK_PACKAGE_VERSION})
SET(PACKAGE_VERSION_MAJOR ${CPACK_PACKAGE_VERSION_MAJOR})
SET(PACKAGE_VERSION_MINOR ${CPACK_PACKAGE_VERSION_MINOR})
SET(PACKAGE_VERSION_PATCH ${CPACK_PACKAGE_VERSION_PATCH})
set(PACKAGE_SOURCE "<https://gitlab.math.tu-dresden.de/iwr/amdis.git>")
set(PACKAGE_CONTACT ${CPACK_PACKAGE_CONTACT})
execute_process(COMMAND date OUTPUT_VARIABLE PACKAGE_DATE)
file(READ ${CMAKE_SOURCE_DIR}/AUTHORS PACKAGE_AUTHORS)
set(PACKAGE_DESCRIPTION_SUMMARY ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
set(PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
set(PACKAGE_LICENSE_FILE ${CMAKE_SOURCE_DIR}/LICENSE)
set(PACKAGE_README_FILE ${CMAKE_SOURCE_DIR}/README.md)
set(PACKAGE_DESCRIPTION_FILE ${PACKAGE_README_FILE})
# extract package generated by CPack
execute_process(COMMAND tar -xzf ${TGZ_FILENAME} -C ${OUT_DIR})
set(DEBIAN_DIR ${OUT_DIR}/${PACKAGE_PREFIX}/debian)
# generate necessary files for debian packages
if (NOT EXISTS ${CMAKE_SOURCE_DIR}/CHANGELOG)
configure_file(${IN_DIR}/debian.changelog.in ${CMAKE_SOURCE_DIR}/CHANGELOG @ONLY)
elseif (UPDATE_CHANGELOG)
execute_process(COMMAND dch -i -M "New release version published at ${CURRENT_DATE}" -c ${CMAKE_SOURCE_DIR}/CHANGELOG)
endif ()
message(STATUS "Changelog must be uploaded to master")
file(MAKE_DIRECTORY ${DEBIAN_DIR})
file(MAKE_DIRECTORY ${DEBIAN_DIR}/soure)
configure_file(${CMAKE_SOURCE_DIR}/CHANGELOG ${DEBIAN_DIR}/changelog COPYONLY)
configure_file(${IN_DIR}/debian.copyright.in ${DEBIAN_DIR}/copyright @ONLY)
configure_file(${IN_DIR}/debian.control.in ${DEBIAN_DIR}/control @ONLY)
configure_file(${IN_DIR}/debian.rules.in ${DEBIAN_DIR}/rules @ONLY)
execute_process(COMMAND chmod +x ${DEBIAN_DIR}/rules)
file(WRITE ${DEBIAN_DIR}/compat "9\n")
file(WRITE ${DEBIAN_DIR}/soure/format "3.0 (quilt)\n")
# generate the debian package
execute_process(COMMAND debuild -us -uc
WORKING_DIRECTORY ${OUT_DIR}/${PACKAGE_PREFIX})
@PACKAGE_NAME@ (@PACKAGE_VERSION@-1) UNRELEASED; urgency=medium
* Initial release.
-- @PACKAGE_CONTACT@ @PACKAGE_DATE@
Source: @PACKAGE_NAME@
Maintainer: @PACKAGE_CONTACT@
Section: @PACKAGE_SECTION@
Priority: optional
Standards-Version: 3.9.2
Build-Depends: debhelper (>= 9), libboost-date-time-dev (>= 1.48),
libboost-filesystem-dev (>= 1.48), libboost-iostreams-dev (>= 1.48),
libboost-program-options-dev (>= 1.48), libboost-system-dev (>= 1.48),
zlib1g-dev (>= 1.2), libsuitesparse-dev (>= 4.2.1), cmake (>= 2.8.10)
Package: @PACKAGE_NAME@
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libboost-date-time-dev (>= 1.48),
libboost-filesystem-dev (>= 1.48), libboost-iostreams-dev (>= 1.48),
libboost-program-options-dev (>= 1.48), libboost-system-dev (>= 1.48),
zlib1g-dev (>= 1.2), libsuitesparse-dev (>= 4.2.1), cmake (>= 2.8.10)
Description: @PACKAGE_DESCRIPTION_SUMMARY@
@PACKAGE_DESCRIPTION@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: @PACKAGE_NAME@
Source: @PACKAGE_SOURCE@
Files: *
Copyright: @PACKAGE_AUTHORS@
License: MIT
Files: debian/*
Copyright: @YEAR@ @PACKAGE_CONTACT@
License: MIT
License: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
#!/usr/bin/make -f
%:
dh $@
override_dh_auto_configure:
cmake -DCMAKE_BUILD_TYPE=@CONFIG@ \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DENABLE_EXTENSIONS:BOOL=ON \
-DENABLE_COMPRESSION:BOOL=ON @ADDITIONAL_FLAGS@ \
AMDiS
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