From bb5cd961923ddae1b5c78d120030bed01171d528 Mon Sep 17 00:00:00 2001 From: J Date: Wed, 10 Dec 2025 00:02:51 +0100 Subject: [PATCH] Add installation and packaging targets --- CMakeLists.txt | 24 +++++++++++++++++++++++- cmake/CPackConfig.cmake | 30 ++++++++++++++++++++++++++++++ lintian-report-final.txt | 3 +++ lintian-report-intermediate.txt | 4 ++++ lintian-report_initial.txt | 9 +++++++++ 5 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 cmake/CPackConfig.cmake create mode 100644 lintian-report-final.txt create mode 100644 lintian-report-intermediate.txt create mode 100644 lintian-report_initial.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 94d6c2c..98b76d5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION "3.28") -project("cpackexample" VERSION 0.1.0) +project("cpackexample" VERSION 0.1.2) FIND_PACKAGE(deal.II 9.5 REQUIRED HINTS ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR} @@ -20,3 +20,25 @@ target_link_libraries(cpackexamplelib Boost::filesystem ${YAML_CPP_LIBRARIES}) DEAL_II_SETUP_TARGET("${PROJECT_NAME}") DEAL_II_SETUP_TARGET(cpackexamplelib) + +# Additions for exercise + +install(TARGETS cpackexample + RUNTIME DESTINATION bin +) + +install(TARGETS cpackexamplelib + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION lib +) + +install(FILES + fem/fem.hpp + filesystem/filesystem.hpp + flatset/flatset.hpp + yamlParser/yamlParser.hpp + DESTINATION include/cpackexamplelib +) + +include(cmake/CPackConfig.cmake) diff --git a/cmake/CPackConfig.cmake b/cmake/CPackConfig.cmake new file mode 100644 index 0000000..67a3732 --- /dev/null +++ b/cmake/CPackConfig.cmake @@ -0,0 +1,30 @@ +include(InstallRequiredSystemLibraries) + +set(CPACK_PACKAGE_NAME "cpackexample") +set(CPACK_PACKAGE_VENDOR "Jelitaw") +set(CPACK_PACKAGE_CONTACT "st167417@stud.uni-stuttgart.de") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "exercise for CPack, inluding a small library and executable") +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 "${PROJECT_VERSION}") + +set(CPACK_GENERATOR "TGZ;DEB") + +set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Jelitaw ") +set(CPACK_DEBIAN_PACKAGE_VENDOR "${CPACK_PACKAGE_VENDOR}") +set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") +set(CPACK_DEBIAN_PACKAGE_SECTION "utils") +set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/Jelitaw/cpack-exercise-wt2526") +set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) +set(CPACK_DEBIAN_PACKAGE_DESCRIPTION +"This long description is about an exercise for CPack; + + This package contains the cpackexamplelib library and the + cpackexample executable used in the SSE packaging exercise.") + +set(CPACK_STRIP_FILES ON) + +set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_PROCESSOR}") + +include(CPack) diff --git a/lintian-report-final.txt b/lintian-report-final.txt new file mode 100644 index 0000000..7702a2e --- /dev/null +++ b/lintian-report-final.txt @@ -0,0 +1,3 @@ +E: cpackexample: no-changelog usr/share/doc/cpackexample/changelog.gz (native package) +E: cpackexample: no-copyright-file +W: cpackexample: no-manual-page [usr/bin/cpackexample] diff --git a/lintian-report-intermediate.txt b/lintian-report-intermediate.txt new file mode 100644 index 0000000..6d544ce --- /dev/null +++ b/lintian-report-intermediate.txt @@ -0,0 +1,4 @@ +E: cpackexample: description-synopsis-is-duplicated line 1 +E: cpackexample: no-changelog usr/share/doc/cpackexample/changelog.gz (native package) +E: cpackexample: no-copyright-file +W: cpackexample: no-manual-page [usr/bin/cpackexample] diff --git a/lintian-report_initial.txt b/lintian-report_initial.txt new file mode 100644 index 0000000..0c0eae5 --- /dev/null +++ b/lintian-report_initial.txt @@ -0,0 +1,9 @@ +E: cpackexample: bad-version-number .. +E: cpackexample: extended-description-is-empty +E: cpackexample: extended-description-is-empty +E: cpackexample: no-changelog usr/share/doc/cpackexample/changelog.gz (native package) +E: cpackexample: no-changelog usr/share/doc/cpackexample/changelog.gz (native package) +E: cpackexample: no-copyright-file +E: cpackexample: no-copyright-file +W: cpackexample: no-manual-page [usr/bin/cpackexample] +W: cpackexample: no-manual-page [usr/bin/cpackexample]