cmake-template.SlackBuild: write documentation directly beneath /usr#4
Open
chrisnovakovic wants to merge 1 commit intoSlackBuildsOrg:masterfrom
Open
cmake-template.SlackBuild: write documentation directly beneath /usr#4chrisnovakovic wants to merge 1 commit intoSlackBuildsOrg:masterfrom
/usr#4chrisnovakovic wants to merge 1 commit intoSlackBuildsOrg:masterfrom
Conversation
CMake's built-in `GNUInstallDirs` module defines the `CMAKE_INSTALL_DOCDIR`, `CMAKE_INSTALL_INFODIR` and `CMAKE_INSTALL_MANDIR` variables as the installation paths for generic documentation, info pages and man pages respectively. Define Slackware-friendly default values for these variables - `/usr/doc`, `/usr/info` and `/usr/man` respectively - rather than the typical directories beneath `/usr/share`.
chrisnovakovic
commented
Sep 12, 2023
Comment on lines
+118
to
+120
| -DCMAKE_INSTALL_DOCDIR="doc/$PRGNAM-$VERSION" \ | ||
| -DCMAKE_INSTALL_INFODIR=info \ | ||
| -DCMAKE_INSTALL_MANDIR=man \ |
Contributor
Author
There was a problem hiding this comment.
If a relative path is given for any of these variables, the computed installation path is relative to CMAKE_INSTALL_PREFIX, as documented in /usr/share/cmake-*/Modules/GNUInstallDirs.cmake.
| -DCMAKE_INSTALL_INFODIR=info \ | ||
| -DCMAKE_INSTALL_MANDIR=man \ | ||
| -DLIB_SUFFIX=${LIBDIRSUFFIX} \ | ||
| -DMAN_INSTALL_DIR=/usr/man \ |
Contributor
Author
There was a problem hiding this comment.
This is perhaps more contentious. Sourcegraph suggests that the built-in CMAKE_INSTALL_MANDIR is much more widely used than MAN_INSTALL_DIR - 9.2k results vs 1.5k. I'd say MAN_INSTALL_DIR should be defined for projects that don't use the built-in variable.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
CMake's built-in
GNUInstallDirsmodule defines theCMAKE_INSTALL_DOCDIR,CMAKE_INSTALL_INFODIRandCMAKE_INSTALL_MANDIRvariables as the installation paths for generic documentation, info pages and man pages respectively. Define Slackware-friendly default values for these variables -/usr/doc,/usr/infoand/usr/manrespectively - rather than the typical directories beneath/usr/share.