-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create deb package #2
base: main
Are you sure you want to change the base?
Conversation
457b5c4
to
c395633
Compare
c395633
to
5130a09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
cmake/Package.cmake
Outdated
endif() | ||
|
||
if(NOT CPACK_SOURCE_IGNORE_FILES) | ||
set(CPACK_SOURCE_IGNORE_FILES="/.github/;/build/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed :)
cmake/Package.cmake
Outdated
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
cmake/Package.cmake
Outdated
|
||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 🇪🇸!
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.