-
Notifications
You must be signed in to change notification settings - Fork 71
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
Improve packaging of Linux / .deb GUI applications #545
Conversation
Use _ instead of - as separators. Replace x86_64 arch by amd64. Also changed package version to use ~codename instead of ~revision. This makes the name more readable, e.g. 1.3.2~xenial instead of 1.3.2~16.04, although this could be removed in the future as it is not part of any standard. Removed unused CPACK_PACKAGE_NAME_EXTRA. Users could still set CPACK_DEBIAN_PACKAGE_VERSION if they want to use a different name. Final result: deflect6_0.13.0~xenial_amd64.deb instead of: deflect6-0.13.0~16.04.x86_64.deb
one thing I am not sure about is whether or not we want to keep the ABI version in the package name. In this case it feels a bit strange that users have to install "deflect6" and not "deflect". |
I've seen the ABI as part of the package name in the past and this is in the guidelines for packaging shared libraries http://packaging.ubuntu.com/html/libraries.html. To be fully correct, the output packages should be libdeflect6 and libdeflect-dev maybe leaving deflect as a meta package pointing to the other two. |
You're right, this is indeed the correct answer. I also remember that CPack can choose which components to install, so excluding the DEV part for example is easy, but creating the multiple packages which depend on each other might be more tricky. All of this is a bit of an overkill for such a simple project. On a side note, I find it odd the the -dev package doesn't contain the SONAME too... |
Note that SONAME and ABI number are not the same thing. Packages do not contain the SONAME. Based on my experience I guess that the -dev packages depends on the library package with the largest ABI version, which means that at system level you can have multiple binary versions, but as a developer your not supposed to use anything but the latest. This makes sense because headers go all under /usr/include so it's not possible to avoid name collisions in the general case, but you don't have this problem with library names. |
Sorry, yes I meant the ABI number. |
Ideally there would be a desktopstreamer package which depends on libdeflect/deflect/[version] package. For end-users deflect does not give away that this contains the desktopstreamer tool they want. |
CommonApplication.cmake
Outdated
@@ -17,7 +17,8 @@ | |||
# * NAME_OMIT_CHECK_TARGETS do not create cppcheck targets | |||
# * ARGN for optional add_executable parameters | |||
# * NAME_DATA files for share/Project/data (in binary and install dir) | |||
# * NAME_ICON optional .icns file (Mac OS GUI applications only) | |||
# * NAME_DESKTOP optional .desktop file (Linux GUI applications only) | |||
# * NAME_ICON optional .icns (Mac OS) or .png (Linux) file (GUI app. only) |
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.
The name should be without extension, so user CMake code is simpler. We can append the extension here and document it.
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.
Why not, we can do that, but it is also less explicit. We could also make it fully auto-magic and search for a file ${app_name}.extension in the current folder...
desktopstreamer seems future-proof, users don't care about Deflect and if we ever split the packages in the future the package that matters to users will stay with the same name. |
@tribal-tec That's true but it requires one another separate package with more inter-dependencies. I tried to play with component grouping with CPack to generate multiple packages but I can't modify the package output names (currently deflect6_0.13.0 |
Let me search what I did in RTNeuron, because I'm pretty sure I was able to create packages exactly with the names I wanted and the correct dependencies. My only concern is that I may have used some secret magick sauce and if the recipe is not in the repository, then it's certainly lost. |
For the record, @hernando pointed out to a solution for creating multiple packages with any CMake version, which is to call the cpack command line tool multiple times from a custom target. This could be useful to have package targets for subprojects too, insead of only a top level package target. But I'm not going to invest time into such a big change until we need it for more projects. As discussed above I will close this story by making a single package named desktopstreamer. |
ping - please review the last two commits only, one of which is a counter-proposal to @eile 's request that NAME_ICON should not take an extension |
+1 |
Preparation work to release a Deflect package with a DesktopStreamer menu entry for Ubuntu 16.04