-
Notifications
You must be signed in to change notification settings - Fork 273
Create deb package #233
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
Closed
+95
−5
Closed
Create deb package #233
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Build dir | ||
| [Bb]uild/ | ||
|
|
||
| # Install dir | ||
| [Ii]nstall/ | ||
|
|
||
| # Package dir | ||
| [Pp]ackage[-_\s\d]*/ | ||
|
|
||
| # Test dir | ||
| [Tt]esting/ | ||
|
|
||
| # CMake | ||
| CMakeCache.txt | ||
| CMakeFiles/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| set(CPACK_PACKAGE_VENDOR "khronos") | ||
|
|
||
| set(CPACK_PACKAGE_DESCRIPTION "OpenCL (Open Computing Language) C header files") | ||
|
|
||
| set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") | ||
|
|
||
| set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md") | ||
|
|
||
| if(NOT CPACK_PACKAGING_INSTALL_PREFIX) | ||
| set(CPACK_PACKAGING_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") | ||
| endif() | ||
|
|
||
| # DEB packaging configuration | ||
| set(CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_VENDOR}) | ||
|
|
||
| set(CPACK_DEBIAN_PACKAGE_HOMEPAGE | ||
| "https://github.com/KhronosGroup/OpenCL-Headers") | ||
|
|
||
| # Version number [epoch:]upstream_version[-debian_revision] | ||
| set(LATEST_RELEASE_VERSION "2023.04.17") | ||
| set(CPACK_DEBIAN_PACKAGE_VERSION "${PROJECT_VERSION}~${LATEST_RELEASE_VERSION}") # upstream_version | ||
| set(CPACK_DEBIAN_PACKAGE_RELEASE "1") # debian_revision (because this is a | ||
| # non-native pkg) | ||
| set(PACKAGE_VERSION_REVISION "${CPACK_DEBIAN_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_RELEASE}") | ||
|
|
||
| set(DEBIAN_PACKAGE_NAME "opencl-c-headers") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this an existing package name or something new? If this is a new package name I'd suggest removing "c", since I tend to think of "OpenCL C" as being the kernel language. |
||
| set(CPACK_DEBIAN_PACKAGE_NAME | ||
| "${DEBIAN_PACKAGE_NAME}" | ||
| CACHE STRING "Package name" FORCE) | ||
|
|
||
| # Get architecture | ||
| execute_process(COMMAND dpkg "--print-architecture" OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE) | ||
| string(STRIP "${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}" CPACK_DEBIAN_PACKAGE_ARCHITECTURE) | ||
|
|
||
| # Package file name in deb format: | ||
| # <PackageName>_<VersionNumber>-<DebianRevisionNumber>_<DebianArchitecture>.deb | ||
| set(CPACK_DEBIAN_FILE_NAME "${CPACK_PACKAGE_VENDOR}-${DEBIAN_PACKAGE_NAME}_${PACKAGE_VERSION_REVISION}_${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}.deb") | ||
|
|
||
| set(CPACK_DEBIAN_PACKAGE_DEBUG ON) | ||
|
|
||
| include(CPack) | ||
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.
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.
Out of curiosity where did this date come from? Will it need to be updated manually? If so, when should it be updated?