Create deb package#2
Conversation
457b5c4 to
c395633
Compare
c395633 to
5130a09
Compare
MathiasMagnus
left a comment
There was a problem hiding this comment.
This is a good start, but this implementation has a fundamental shortcoming: it packages the source tree, not the install tree. It uses CPackSourceConfig.cmake instead of CPackConfig.cmake and it's missing some of the critical components that are only present in the install tree, such as pkg-config and CMake Package Config files.
Please look into packaging the install tree.
| endif() | ||
|
|
||
| if(NOT CPACK_SOURCE_IGNORE_FILES) | ||
| set(CPACK_SOURCE_IGNORE_FILES="/.github/;/build/") |
There was a problem hiding this comment.
minimally add /.git/;/.gitignore;/install/;/package/ as well. I would consider removing it alltogether and letting the distro maintainers deal with this. It's a 3-liner here, but a 1-liner in CI.
| # Get Debian package name from project name | ||
| string(TOLOWER ${PROJECT_NAME} DEBIAN_PACKAGE_NAME) | ||
| string(REPLACE "opencl" "opencl-" DEBIAN_PACKAGE_NAME ${DEBIAN_PACKAGE_NAME}) |
There was a problem hiding this comment.
There's no need in being smart about it. If the project name changes, this fragment will very likely have to change too. Then just hardcode the result.
| # Get Debian package name from project name | |
| string(TOLOWER ${PROJECT_NAME} DEBIAN_PACKAGE_NAME) | |
| string(REPLACE "opencl" "opencl-" DEBIAN_PACKAGE_NAME ${DEBIAN_PACKAGE_NAME}) | |
| set(DEBIAN_PACKAGE_NAME "opencl-headers") |
|
|
||
| # Version number [epoch:]upstream_version[-debian_revision] | ||
| set(CPACK_DEBIAN_PACKAGE_VERSION ${CPACK_PACKAGE_VERSION}) # upstream_version | ||
| set(CPACK_DEBIAN_PACKAGE_RELEASE "1") # devian_revision (because this is a |
There was a problem hiding this comment.
Spanish typo
| set(CPACK_DEBIAN_PACKAGE_RELEASE "1") # devian_revision (because this is a | |
| set(CPACK_DEBIAN_PACKAGE_RELEASE "1") # debian_revision (because this is a |
2f7a29a to
06d47f1
Compare
06d47f1 to
bc4615e
Compare
04c30c8 to
b2b5a15
Compare
…e and installation prefix fixed
b2b5a15 to
f5893a8
Compare
Adds a CMake module with the packaging configuration and "Package" and "Consume" steps to GitHub actions to check that it works as it should.