diff --git a/cmake/CPackConfig.cmake b/cmake/CPackConfig.cmake new file mode 100644 index 0000000..11cbcbf --- /dev/null +++ b/cmake/CPackConfig.cmake @@ -0,0 +1,23 @@ +set(CPACK_PACKAGE_NAME "${PROJECT_NAME}") +set(CPACK_PACKAGE_VENDOR "SSE") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Package containing SSE CPack exercise library and executable.") +set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Functionality for solving a poisson problem with FEM, flatset modification, + filesystem inspection and YAML file parsing") +set(CPACK_PACKAGE_CONTACT "feegeer@users.github.com") +set(CPACK_PACKAGE_MAINTAINERS "feegeer ${CPACK_PACKAGE_CONTACT}" + CACHE STRING "This project acts as a demonstration of how CPack can be used to package CMake projects.") +set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/feegeer/cpack-exercise-wt2526") +set(CPACK_STRIP_FILES TRUE) + +# DEB packaging +set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) +set(CPACK_DEBIAN_PACKAGE_MAINTAINER "feegeer <${CPACK_PACKAGE_CONTACT}>") +set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS YES) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cpackexample.1.gz + DESTINATION share/man/man1) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/changelog.gz debian/copyright + DESTINATION share/doc/cpackexample) + +set(CPACK_GENERATOR "TGZ;DEB") +include(CPack) diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..8175e8c --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +cpackexample (0.1.0-1) unstable; + + * Initial release. + + -- feegeer Sun, 07 Dec 2025 18:50:30 +0100 diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..68f8d3f --- /dev/null +++ b/debian/copyright @@ -0,0 +1,8 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Source: https://github.com/feegeer/cpack-exercise-wt2526 +Upstream-Name: cpack-exercise-wt2526 +Upstream-Contact: feegeer + +Files: * +License: MIT +Copyright: Copyright (c) 2021 Simulation-Software-Engineering diff --git a/debian/cpackexample.1 b/debian/cpackexample.1 new file mode 100644 index 0000000..5a992f8 --- /dev/null +++ b/debian/cpackexample.1 @@ -0,0 +1,18 @@ +.TH cpackexample 1 "2025" "cpackexample" "User Commands" +.SH NAME +cpackexample \- run FEM example, modify flat sets, inspect filesystem, and optionally parse a YAML file +.SH SYNOPSIS +.B cpackexample +[\fIYAMLFILE\fR] +.SH DESCRIPTION +Runs a small demonstration program that: +- solves a Poisson problem using FEM, +- modifies and prints a flat set, +- inspects the current directory, +- and parses a YAML file if one is provided. +.SH ARGUMENTS +.TP +\fBYAMLFILE\fR +YAML file to parse. If omitted, prints usage information. +.SH AUTHOR +feegeer diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..397ae2a --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,10 @@ +#!/bin/bash +mkdir -p ./build && cd build && \ +gzip -c -9n ../debian/cpackexample.1 > cpackexample.1.gz && \ +gzip -c -9n ../debian/changelog > changelog.gz && \ +cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release .. && \ +make package && cd .. && \ +cp ./build/cpackexample_0.1.0_amd64.deb . && \ +cp ./build/cpackexample-0.1.0-Linux.tar.gz . && \ +rm -rf build && \ +lintian ./cpackexample_0.1.0_amd64.deb