Skip to content
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

cmake-template.SlackBuild: write documentation directly beneath /usr #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chrisnovakovic
Copy link
Contributor

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.

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`.
Comment on lines +118 to +120
-DCMAKE_INSTALL_DOCDIR="doc/$PRGNAM-$VERSION" \
-DCMAKE_INSTALL_INFODIR=info \
-DCMAKE_INSTALL_MANDIR=man \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DMAN_INSTALL_DIR=/usr/man \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

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.

1 participant