Add installation and packaging target #23
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.
GitLab Username: schmidpl
How to test:
build the docker image:
docker build -t cpackexample .Run the container:
docker run --rm -it --mount type=bind,source="$(pwd)",target=/mnt/cpack-exercise cpackexercisebuild the packages inside the container:
cd /mnt/cpack-exercise mkdir build && cd build cmake .. make -j4 make packagetest the packages inside the container:
`dpkg-deb -c cpackexample_0.1.0_amd64.deb
tar -tzf cpackexample-0.1.0-Linux.tar.gz
make install DESTDIR=/tmp/test-install
apt install -y ./cpackexample_0.1.0_amd64.deb
cpackexample
lintian ./cpackexample_0.1.0_amd64.deb
`
Final Lintian Output:
'
root@194e97b2f21d:/mnt/cpack-exercise/build# lintian ./cpackexample_0.1.0_amd64.deb
running with root privileges is not recommended!
E: cpackexample: no-changelog usr/share/doc/cpackexample/changelog.gz (native package)
E: cpackexample: no-copyright-file
W: cpackexample: extended-description-line-too-long line 1
W: cpackexample: no-manual-page [usr/bin/cpackexample]
'
Changes:
CMakeLists.txtto add install targetscmake/CPackConfig.cmaketo generate debian packages