Skip to content

Conversation

@Jelitaw
Copy link

@Jelitaw Jelitaw commented Dec 9, 2025

GitLab Username: wolljs

Summary of changes

  • Added install targets for executable, library, and headers
  • Added cmake/CPackConfig.cmake with TGZ and DEB generators
  • Package version set from project version
  • Added long description for lintian

Test package

All steps have to be done from inside the docker container for reproducability:
First, build and package:

cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j
cmake --build build --target package

If the package also wants to be inspected, this can be done with:

dpkg-deb -c build/*.deb
tar -tzf build/*.tar.gz

The debian package can then be installed with apt like this:

apt install -y ./build/*.deb
cpackexample

And the lintian report can be produced (and saved) like this:

lintian build/*.deb | tee lintian-report.txt

Optional Tasks

The initial lintian report showed duplicate errors and warnings, as I buildt two times, without deleting the build directory inbetween. Another error was bad version number, as I first had the version number in CPack hardcoded instad of taken from the CMakteLists.txt. The last error that I fixed, was the missing extended description, by adding a longer description (that starts with the short one and explains it then a bit better). After those fixes however I got another error, as my approach for the extended description was just to extend the short one, thus I had duplicate descriptions. After changing the first paragraph of the long description, lintian produced the report in lintian-report-final.txt

AI

I did use AI during this project, especially to understand the error with bad version number and to help with some options in the CPackConfig.cmake. All file contents were however written by myself (or produced by lintian).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant