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
39 changes: 39 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION "3.28")

project("cpackexample" VERSION 0.1.0)

include(GNUInstallDirs)

FIND_PACKAGE(deal.II 9.5 REQUIRED
HINTS ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
)
Expand All @@ -18,5 +20,42 @@ add_executable("${PROJECT_NAME}" main.cpp)
target_link_libraries("${PROJECT_NAME}" cpackexamplelib)
target_link_libraries(cpackexamplelib Boost::filesystem ${YAML_CPP_LIBRARIES})

target_include_directories(cpackexamplelib
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/cpackexamplelib>
)

install(TARGETS "${PROJECT_NAME}" cpackexamplelib
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)

install(DIRECTORY fem filesystem flatset yamlParser
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/cpackexamplelib
FILES_MATCHING PATTERN "*.hpp"
)

install(FILES README.md
DESTINATION ${CMAKE_INSTALL_DOCDIR}
)

install(FILES LICENSE
DESTINATION ${CMAKE_INSTALL_DOCDIR}
RENAME copyright
)

install(FILES debian/changelog.Debian.gz
DESTINATION ${CMAKE_INSTALL_DOCDIR}
RENAME changelog.Debian.gz
)

install(FILES docs/cpackexample.1.gz
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
)

DEAL_II_SETUP_TARGET("${PROJECT_NAME}")
DEAL_II_SETUP_TARGET(cpackexamplelib)

include(cmake/CPackConfig.cmake)
22 changes: 22 additions & 0 deletions cmake/CPackConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}")
set(CPACK_PACKAGE_VENDOR "gufarui")
set(CPACK_PACKAGE_CONTACT "gufarui <st196511@stud.uni-stuttgart.de>")
set(CPACK_PACKAGE_MAINTAINER "gufarui <st196511@stud.uni-stuttgart.de>")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Example FEM/Boost/yaml-cpp project packaged for the SSE exercise")
set(CPACK_PACKAGE_DESCRIPTION "Exercises the deal.II FEM solver, Boost containers/filesystem, and yaml-cpp parser.")
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/gufarui/cpack-exercise-wt2526")
set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")

set(CPACK_GENERATOR "TGZ;DEB")
set(CPACK_STRIP_FILES TRUE)
set(CPACK_DEBIAN_PACKAGE_RELEASE 1)

set(CPACK_DEBIAN_PACKAGE_SECTION "science")
set(CPACK_DEBIAN_PACKAGE_DESCRIPTION
"Example code for the Simulation Software Engineering course.")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "gufarui <st196511@stud.uni-stuttgart.de>")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "${CPACK_PACKAGE_HOMEPAGE_URL}")

include(CPack)
7 changes: 7 additions & 0 deletions debian/changelog.Debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cpackexample (0.1.0) unstable; urgency=medium

* Initial binary package for the Packaging with CPack exercise. Provides
the sample FEM/Boost/yaml-cpp playground from the Simulation Software
Engineering course material.

-- gufarui <st196511@stud.uni-stuttgart.de> Sun, 07 Dec 2025 15:00:00 +0100
Binary file added debian/changelog.Debian.gz
Binary file not shown.
32 changes: 32 additions & 0 deletions docs/cpackexample.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.TH cpackexample 1 "December 2025" "cpackexample 0.1.0"
.SH NAME
cpackexample \- Demonstration binary packaged for the Simulation Software Engineering exercise
.SH SYNOPSIS
.B cpackexample
.RI [ YAMLFILE ]
.SH DESCRIPTION
The
.B cpackexample
executable is a small driver that ties together several sample modules used in
the Simulation Software Engineering course. It showcases a Poisson solver based
on deal.II, a Boost flat set playground, a Boost filesystem demo, and a
yaml-cpp configuration parser.
.PP
When a
.I YAMLFILE
argument is provided, the program attempts to parse it using yaml-cpp and print
the discovered configuration options. Without the argument it prints a short
usage hint.
.SH OPTIONS
.TP
.I YAMLFILE
Optional path to a YAML configuration file that should be parsed with
yaml-cpp.
.SH FILES
.TP
.I /usr/share/doc/cpackexample
Contains documentation such as the MIT license and Debian changelog for the
package.
.SH AUTHOR
Packaged by gufarui <st196511@stud.uni-stuttgart.de> for the Packaging with
CPack exercise at the University of Stuttgart.
Binary file added docs/cpackexample.1.gz
Binary file not shown.