diff --git a/CMakeLists.txt b/CMakeLists.txt index 5885cf69..1f0dc826 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -568,16 +568,30 @@ endif() # Ship the license notices (top-level LICENSE, the third-party manifest, and the verbatim -# license texts) with every package variant, under share/doc/jfjoch. Installed per component so -# the file lands in whichever component package(s) the current build mode produces. +# license texts) with every package variant. Installed per component so the files land in +# whichever component package(s) the current build mode produces. +# +# Each component gets a directory of its own, named after the package's principal binary: +# share/doc/jfjoch_broker, jfjoch_writer, jfjoch_viewer, jfjoch_driver_dkms. No two components +# may write the same path, and no component writes the plain share/doc/jfjoch these all used to +# share. Deployment updates the packages one at a time (jfjoch first, then jfjoch-writer), so a +# path claimed by two packages blocks the first step as soon as a release changes its content - +# and leaving the main package on the old shared path would keep blocking it for anyone +# upgrading from a release that still had the collision. These notices were the only files any +# two components had in common. SET(JFJOCH_NOTICE_FILES ${CMAKE_SOURCE_DIR}/LICENSE ${CMAKE_SOURCE_DIR}/THIRD_PARTY_NOTICES.md) FOREACH(_component IN LISTS CPACK_COMPONENTS_ALL) + IF (_component STREQUAL "jfjoch") + SET(_suffix broker) + ELSE() + STRING(REPLACE "-" "_" _suffix ${_component}) + ENDIF() INSTALL(FILES ${JFJOCH_NOTICE_FILES} - DESTINATION share/doc/jfjoch COMPONENT ${_component}) + DESTINATION share/doc/jfjoch_${_suffix} COMPONENT ${_component}) INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/licenses/ - DESTINATION share/doc/jfjoch/licenses COMPONENT ${_component} + DESTINATION share/doc/jfjoch_${_suffix}/licenses COMPONENT ${_component} PATTERN "COLLECT.sh" EXCLUDE) ENDFOREACH()