diff options
author | Martin Braun <martin.braun@ettus.com> | 2022-04-13 16:38:55 +0200 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-06-10 13:24:04 -0500 |
commit | 83a61dfb084fabc4fa378adcbdb8c1aa31142ec6 (patch) | |
tree | cd0c85cf5d729eef4518c69a7da6217e473f0d02 /host | |
parent | fe387470665c5eeccbbf927353a2b368682b34df (diff) | |
download | uhd-83a61dfb084fabc4fa378adcbdb8c1aa31142ec6.tar.gz uhd-83a61dfb084fabc4fa378adcbdb8c1aa31142ec6.tar.bz2 uhd-83a61dfb084fabc4fa378adcbdb8c1aa31142ec6.zip |
cmake: Drop .deb generation via cpack in favour of better tools
Building .deb files has an entire ecosystem dedicated to it which is
superior to cpack, and we don't test cpack, either. Users wanting to
build .deb files should take a look at tools/debs/uhd_ubuntu_deb.py.
Diffstat (limited to 'host')
-rw-r--r-- | host/cmake/Modules/UHDPackage.cmake | 67 |
1 files changed, 18 insertions, 49 deletions
diff --git a/host/cmake/Modules/UHDPackage.cmake b/host/cmake/Modules/UHDPackage.cmake index 2ccbed6e5..f02bd3ca1 100644 --- a/host/cmake/Modules/UHDPackage.cmake +++ b/host/cmake/Modules/UHDPackage.cmake @@ -17,10 +17,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") set(LINUX TRUE) endif() -if(NOT CMAKE_CROSSCOMPILING AND LINUX AND EXISTS "/etc/debian_version") - set(DEBIAN TRUE) -endif() - if(NOT CMAKE_CROSSCOMPILING AND LINUX AND EXISTS "/etc/redhat-release") set(REDHAT TRUE) endif() @@ -34,8 +30,6 @@ elseif(APPLE) set(CPACK_GENERATOR PackageMaker) elseif(WIN32) set(CPACK_GENERATOR NSIS) -elseif(DEBIAN) - set(CPACK_GENERATOR DEB) elseif(REDHAT) set(CPACK_GENERATOR RPM) else() @@ -45,32 +39,24 @@ endif() ######################################################################## # Setup package file name ######################################################################## -if(DEBIAN AND LIBUHD_PKG) - set(CPACK_PACKAGE_FILE_NAME "libuhd${UHD_VERSION_MAJOR}_${UHD_VERSION}_${CMAKE_SYSTEM_PROCESSOR}" CACHE INTERNAL "") -elseif(DEBIAN AND LIBUHDDEV_PKG) - set(CPACK_PACKAGE_FILE_NAME "libuhd-dev_${UHD_VERSION}_${CMAKE_SYSTEM_PROCESSOR}" CACHE INTERNAL "") -elseif(DEBIAN AND UHDHOST_PKG) - set(CPACK_PACKAGE_FILE_NAME "uhd-host_${UHD_VERSION}_${CMAKE_SYSTEM_PROCESSOR}" CACHE INTERNAL "") -else() - if(DEBIAN OR REDHAT) - find_program(LSB_RELEASE_EXECUTABLE lsb_release) - - if(LSB_RELEASE_EXECUTABLE) - #extract system information by executing the commands - execute_process( - COMMAND ${LSB_RELEASE_EXECUTABLE} --short --id - OUTPUT_VARIABLE LSB_ID OUTPUT_STRIP_TRAILING_WHITESPACE - ) - execute_process( - COMMAND ${LSB_RELEASE_EXECUTABLE} --short --release - OUTPUT_VARIABLE LSB_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE - ) - - #set a more sensible package name for this system - set(CPACK_PACKAGE_FILE_NAME "uhd_${UHD_VERSION}_${LSB_ID}-${LSB_RELEASE}-${CMAKE_SYSTEM_PROCESSOR}" CACHE INTERNAL "") - endif(LSB_RELEASE_EXECUTABLE) - endif(DEBIAN OR REDHAT) -endif(DEBIAN AND LIBUHD_PKG) +if(REDHAT) + find_program(LSB_RELEASE_EXECUTABLE lsb_release) + + if(LSB_RELEASE_EXECUTABLE) + #extract system information by executing the commands + execute_process( + COMMAND ${LSB_RELEASE_EXECUTABLE} --short --id + OUTPUT_VARIABLE LSB_ID OUTPUT_STRIP_TRAILING_WHITESPACE + ) + execute_process( + COMMAND ${LSB_RELEASE_EXECUTABLE} --short --release + OUTPUT_VARIABLE LSB_RELEASE OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + #set a more sensible package name for this system + set(CPACK_PACKAGE_FILE_NAME "uhd_${UHD_VERSION}_${LSB_ID}-${LSB_RELEASE}-${CMAKE_SYSTEM_PROCESSOR}" CACHE INTERNAL "") + endif(LSB_RELEASE_EXECUTABLE) +endif(REDHAT) if(${CPACK_GENERATOR} STREQUAL NSIS) @@ -159,23 +145,6 @@ set(CPACK_COMPONENT_EXAMPLES_DEPENDS libraries) set(CPACK_COMPONENT_TESTS_DEPENDS libraries) set(CPACK_COMPONENTS_ALL libraries pythonapi headers utilities examples manual doxygen readme images) -######################################################################## -# Setup CPack Debian -######################################################################## -set(CPACK_DEBIAN_PACKAGE_DEPENDS "libboost-all-dev, python3-requests") -set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "python3, python3-tk") -foreach(filename preinst postinst prerm postrm) - list(APPEND CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${UHD_BINARY_DIR}/debian/${filename}) - file(MAKE_DIRECTORY ${UHD_BINARY_DIR}/debian) - configure_file( - ${UHD_SOURCE_DIR}/cmake/debian/${filename}.in - ${UHD_BINARY_DIR}/debian/${filename} - @ONLY) -endforeach(filename) -configure_file( - ${UHD_SOURCE_DIR}/cmake/debian/watch - ${UHD_BINARY_DIR}/debian/watch -@ONLY) ######################################################################## # Setup CPack RPM |