Skip to content

Commit

Permalink
cmake: Handle conflict between generated .deb and Debian package
Browse files Browse the repository at this point in the history
Update the generated .deb's metadata to enforce that it cannot be
installed alongside the version of libiio shipped in the Debian
repositories.

Fixes #923.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
  • Loading branch information
pcercuei committed Jun 20, 2023
1 parent 508e4bd commit 49dc23d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmake/LinuxPackaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,14 @@ if(${CMAKE_MAJOR_VERSION} LESS 3)
OUTPUT_STRIP_TRAILING_WHITESPACE)
ENDIF(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
endif()

# Make sure the generated .deb cannot be installed alongside the Debian ones
set(CPACK_DEBIAN_PACKAGE_PROVIDES
"libiio0 (= ${LIBIIO_VERSION}), "
"libiio-dev (= ${LIBIIO_VERSION}), "
"libiio-utils (= ${LIBIIO_VERSION}), "
"iiod (= ${LIBIIO_VERSION})")
set(CPACK_DEBIAN_PACKAGE_CONFLICTS "libiio0, libiio-dev, libiio-utils, iiod")
set(CPACK_DEBIAN_PACKAGE_REPLACES "libiio0, libiio-dev, libiio-utils, iiod")

include(CPack)

0 comments on commit 49dc23d

Please sign in to comment.