Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions cmake/CPackConfig.cmake
Original file line number Diff line number Diff line change
@@ -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)
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cpackexample (0.1.0-1) unstable;

* Initial release.

-- feegeer <feegeer@users.github.com> Sun, 07 Dec 2025 18:50:30 +0100
8 changes: 8 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -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 <feegeer@users.github.com>

Files: *
License: MIT
Copyright: Copyright (c) 2021 Simulation-Software-Engineering
18 changes: 18 additions & 0 deletions debian/cpackexample.1
Original file line number Diff line number Diff line change
@@ -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 <feegeer@users.github.com>
10 changes: 10 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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