Skip to content

Create deb package#2

Open
Beanavil wants to merge 3 commits into
mainfrom
58-create-deb-package
Open

Create deb package#2
Beanavil wants to merge 3 commits into
mainfrom
58-create-deb-package

Conversation

@Beanavil
Copy link
Copy Markdown
Member

Adds a CMake module with the packaging configuration and "Package" and "Consume" steps to GitHub actions to check that it works as it should.

@Beanavil Beanavil self-assigned this Jun 15, 2023
@Beanavil Beanavil force-pushed the 58-create-deb-package branch from 457b5c4 to c395633 Compare June 15, 2023 12:45
@Beanavil Beanavil requested review from MathiasMagnus and mfep June 15, 2023 12:46
@Beanavil Beanavil force-pushed the 58-create-deb-package branch from c395633 to 5130a09 Compare June 15, 2023 12:49
Copy link
Copy Markdown

@MathiasMagnus MathiasMagnus left a 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.

Comment thread cmake/Package.cmake Outdated
endif()

if(NOT CPACK_SOURCE_IGNORE_FILES)
set(CPACK_SOURCE_IGNORE_FILES="/.github/;/build/")
Copy link
Copy Markdown

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed :)

Comment thread cmake/Package.cmake Outdated
Comment on lines +23 to +25
# Get Debian package name from project name
string(TOLOWER ${PROJECT_NAME} DEBIAN_PACKAGE_NAME)
string(REPLACE "opencl" "opencl-" DEBIAN_PACKAGE_NAME ${DEBIAN_PACKAGE_NAME})
Copy link
Copy Markdown

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.

Suggested change
# 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")

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Comment thread 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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spanish typo

Suggested change
set(CPACK_DEBIAN_PACKAGE_RELEASE "1") # devian_revision (because this is a
set(CPACK_DEBIAN_PACKAGE_RELEASE "1") # debian_revision (because this is a

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed 🇪🇸!

@Beanavil Beanavil force-pushed the 58-create-deb-package branch 9 times, most recently from 2f7a29a to 06d47f1 Compare June 16, 2023 15:56
@Beanavil Beanavil force-pushed the 58-create-deb-package branch from 06d47f1 to bc4615e Compare June 28, 2023 15:22
@Beanavil Beanavil force-pushed the 58-create-deb-package branch 6 times, most recently from 04c30c8 to b2b5a15 Compare August 1, 2023 09:54
@Beanavil Beanavil force-pushed the 58-create-deb-package branch from b2b5a15 to f5893a8 Compare August 1, 2023 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants