Add installation and packaging targets #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This description is just a copy of the updated README.md file:
Packaging with CPack
Repository for the CPack exercise. The code is a slightly modified version of the code used in the CMake exercise.
How to Test the Code
git clone https://github.com/jkhanGitHub/cpack-exercise-wt2526.git cd cpack-exercise-wt2526To test the changes made for the CPack exercise, follow these steps:
Build the Docker Image:
First, build the Docker image which provides the necessary build environment.
docker build -t cpack-exercise .Run the Docker Container:
Run the Docker container, mounting the current directory to
/mnt/cpack-exercise.docker run --rm -it --mount type=bind,source="$(pwd)",target=/mnt/cpack-exercise cpack-exerciseinside the Docker container cd into
/mnt/cpack-exercise.cd /mnt/cpack-exerciseConfigure and Build the Project (Inside the Container):
Once inside the container, configure CMake and build the project.
Install the Project (Inside the Container):
Run the install target to place the executable, library, and headers in the designated installation directories.
You can verify the installation by checking the
/usr/local/bin,/usr/local/lib, and/usr/local/include/cpackexamplelibdirectories.Generate Packages (Inside the Container):
Build the
packagetarget to generate both.tar.gzand Debian (.deb) packages.The generated packages will be in the
build/directory, e.g.,cpackexample-0.1.0-Linux.tar.gzandcpackexample_0.1.0_amd64.deb.Install the Debian Package (Inside the Container):
Install the generated Debian package using
apt.Run the Installed Executable (Inside the Container):
Verify that the executable is in the system's PATH and runs correctly.
The output should show the program executing its various modules.
Check the Debian Package with Lintian (Inside the Container):
Inspect the generated Debian package for common errors and policy violations using
lintian.Note: Several warnings and errors are expected from
lintianas per the exercise instructions, and no fixes for these were implemented as they were optional tasks.Optional Tasks
No optional tasks were completed as part of this exercise.