Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
3.1.1
-
None
-
Fedora
Description
First of all:
the package is named "mariadb-connector-odbc" with dashes, but installs documentation and licenses to the "<some_path>/mariadb_connector_odbc" with underscores, which is not correct from the packaging POV.
316 SET(CPACK_PACKAGE_NAME "mariadb_connector_odbc")
|
IMHO that should be fixed to use the dashes. If the non GNU/Linux distributions use underscores, there probbably should be if clause.
Now to the core issue:
In Fedora (RHEL, CentOS, ...) the documentation lies in "/usr/share/doc/<pkgname>" and license files are located in "/usr/share/licenses/<pkgname>".
I'd like to have those two paths configurable for that reason.
--- mariadb-connector-odbc-3.1.1-ga-src/CMakeLists.txt 2019-05-02 14:41:44.000000000 +0200
|
+++ mariadb-connector-odbc-3.1.1-ga-src/CMakeLists.txt_patched 2019-06-25 14:31:46.211295272 +0200
|
@@ -333,12 +333,24 @@ ELSE()
|
LIBRARY DESTINATION ./${INSTALL_LIB_SUFFIX}
|
COMPONENT ODBCLibs)
|
|
+ IF(NOT DEFINED INSTALL_DOC_DIR)
|
+ SET(INSTALL_DOC_DIR "./share/doc/${CPACK_PACKAGE_NAME}/")
|
+ ENDIF()
|
+ IF(NOT DEFINED INSTALL_LICENSE_DIR)
|
+ SET(INSTALL_LICENSE_DIR "./share/doc/${CPACK_PACKAGE_NAME}/")
|
+ ENDIF()
|
+
|
INSTALL(FILES
|
- ${CMAKE_SOURCE_DIR}/COPYING
|
${CMAKE_SOURCE_DIR}/README
|
DESTINATION
|
- ./share/doc/${CPACK_PACKAGE_NAME}/
|
+ ${INSTALL_DOC_DIR}
|
COMPONENT Documentation)
|
+ INSTALL(FILES
|
+ ${CMAKE_SOURCE_DIR}/COPYING
|
+ DESTINATION
|
+ ${INSTALL_LICENSE_DIR}
|
+ COMPONENT Documentation)
|
+
|
ENDIF()
|
|
# Tests. Checking if we have them. May be not the case if we are building from source package
|
|
This way it will default to what is hardcoded now, while granting the freedom to change any of those paths if necessary.
I'm not sure however, how to add those macros to show up with description when "cmake -LAH" is called
Also I'm not sure if you have something like "COMPONENT License", which could be used there.