Skip to content

Conversation

@silasmue
Copy link

@silasmue silasmue commented Dec 6, 2025

GitLab name: muelless

To reproduce the steps:
Build the docker image:

docker build -t cpack-exercise .

Then start the container, mount the source directory:

sudo docker run --rm -it --mount type=bind,source="$(pwd)",target=/mnt/cpack-exercise cpack-exercise

Change directory to the source code and create a build directory:

cd /mnt/cpack-exercise
mkdir build/
cd build/

Initialize cmake and build the packages:

cmake ..
make package

The last step builds the library, the binary and packs the binary and the library in cpackexample-0.1.0-Linux.tar.gz and a debian, cpackexample_0.1.0_amd64.deb, package that can be installed afterwards with the following command:

apt install ./cpackexample_0.1.0_amd64.deb

When the package is installed successfully you can try the command cpackexample to confirm the installation.

The output of lintian ./cpackexample_0.1.0_amd64.deb should look like this:

lintian ./cpackexample_0.1.0_amd64.deb     
running with root privileges is not recommended!
E: cpackexample: description-contains-invalid-control-statement line 2
E: cpackexample: no-changelog usr/share/doc/cpackexample/changelog.gz (native package)
E: cpackexample: non-standard-toplevel-dir [cpackexamplelib/]             
W: cpackexample: file-in-unusual-dir [cpackexamplelib/fem.hpp]
W: cpackexample: file-in-unusual-dir [cpackexamplelib/filesystem.hpp]
W: cpackexample: file-in-unusual-dir [cpackexamplelib/flatset.hpp]
W: cpackexample: file-in-unusual-dir ... use "--tag-display-limit 0" to see all (or pipe to a file/program)
W: cpackexample: no-manual-page [usr/bin/cpackexample]

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