From 1b45e6affe9d0e8af0500660984a27b5203f26b3 Mon Sep 17 00:00:00 2001 From: Zhang Rongchuan Date: Tue, 9 Dec 2025 22:54:27 -0800 Subject: [PATCH 1/2] Add installation and packaging targets --- CMakeLists.txt | 22 ++++++++++++++++++++++ cmake/CPackConfig.cmake | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 cmake/CPackConfig.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 94d6c2c..91d0389 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,3 +20,25 @@ target_link_libraries(cpackexamplelib Boost::filesystem ${YAML_CPP_LIBRARIES}) DEAL_II_SETUP_TARGET("${PROJECT_NAME}") DEAL_II_SETUP_TARGET(cpackexamplelib) + +install( + TARGETS cpackexample + RUNTIME DESTINATION bin +) + +install( + TARGETS cpackexamplelib + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install( + FILES + ${CMAKE_SOURCE_DIR}/fem/fem.hpp + ${CMAKE_SOURCE_DIR}/filesystem/filesystem.hpp + ${CMAKE_SOURCE_DIR}/flatset/flatset.hpp + ${CMAKE_SOURCE_DIR}/yamlParser/yamlParser.hpp + DESTINATION include/cpackexamplelib +) + +include(${CMAKE_SOURCE_DIR}/cmake/CPackConfig.cmake) diff --git a/cmake/CPackConfig.cmake b/cmake/CPackConfig.cmake new file mode 100644 index 0000000..a0792e3 --- /dev/null +++ b/cmake/CPackConfig.cmake @@ -0,0 +1,38 @@ +# cmake/CPackConfig.cmake + + +set(CPACK_PACKAGE_NAME "cpackexample") + +set(CPACK_PACKAGE_VERSION_MAJOR "0") +set(CPACK_PACKAGE_VERSION_MINOR "1") +set(CPACK_PACKAGE_VERSION_PATCH "0") +set(CPACK_PACKAGE_VERSION "0.1.0") + +set(CPACK_PACKAGE_VENDOR "Rongchuan Zhang") +set(CPACK_PACKAGE_CONTACT "rongchuanzhang971@gmail.com") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY + "Example FEM mini project packaged with CPack for the SSE course.") +set(CPACK_PACKAGE_HOMEPAGE_URL + "https://github.com/zhangrongchuancpack-exercise-wt2526") + +set(CPACK_GENERATOR "TGZ;DEB") + +set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Rongchuan Zhang") + +set(CPACK_STRIP_FILES ON) + +set(CPACK_DEBIAN_PACKAGE_NAME "cpackexample") +set(CPACK_DEBIAN_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION}") +set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") + +# Section / priority +set(CPACK_DEBIAN_PACKAGE_SECTION "utils") +set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") + +set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, libyaml-cpp-dev") + +set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) + +include(CPack) From 40f16912b2cf28f86041ddcda285aeaabe13c45a Mon Sep 17 00:00:00 2001 From: Zhang Rongchuan Date: Tue, 9 Dec 2025 22:58:52 -0800 Subject: [PATCH 2/2] add lintian output --- lintian_output.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lintian_output.txt diff --git a/lintian_output.txt b/lintian_output.txt new file mode 100644 index 0000000..8676474 --- /dev/null +++ b/lintian_output.txt @@ -0,0 +1,20 @@ +E: cpackexample: dir-in-usr-local [usr/local/bin/] +E: cpackexample: dir-in-usr-local [usr/local/include/] +E: cpackexample: dir-in-usr-local [usr/local/include/cpackexamplelib/] +E: cpackexample: dir-in-usr-local [usr/local/lib/] +E: cpackexample: extended-description-is-empty +E: cpackexample: file-in-usr-local [usr/local/bin/cpackexample] +E: cpackexample: file-in-usr-local [usr/local/include/cpackexamplelib/fem.hpp] +E: cpackexample: file-in-usr-local [usr/local/include/cpackexamplelib/filesystem.hpp] +E: cpackexample: file-in-usr-local [usr/local/include/cpackexamplelib/flatset.hpp] +E: cpackexample: file-in-usr-local [usr/local/include/cpackexamplelib/yamlParser.hpp] +E: cpackexample: file-in-usr-local [usr/local/lib/libcpackexamplelib.a] +E: cpackexample: malformed-contact Maintainer Rongchuan +E: cpackexample: no-changelog usr/share/doc/cpackexample/changelog.gz (native package) +E: cpackexample: no-copyright-file +W: cpackexample: file-in-unusual-dir [usr/local/bin/cpackexample] +W: cpackexample: file-in-unusual-dir [usr/local/include/cpackexamplelib/fem.hpp] +W: cpackexample: file-in-unusual-dir [usr/local/include/cpackexamplelib/filesystem.hpp] +W: cpackexample: file-in-unusual-dir [usr/local/include/cpackexamplelib/flatset.hpp] +W: cpackexample: file-in-unusual-dir [usr/local/include/cpackexamplelib/yamlParser.hpp] +W: cpackexample: file-in-unusual-dir [usr/local/lib/libcpackexamplelib.a]