Skip to content

Commit

Permalink
Modified the debian package name
Browse files Browse the repository at this point in the history
The package name before applying this change: `ydlidar_sdk-1.2.6.deb`
The package name after applying this change: `ydlidar-sdk_1.2.6_amd64.deb`

This change aligns with the Debian package naming conventions as per:
https://www.debian.org/doc/manuals/debian-faq/pkg-basics.en.html#pkgname

Tested on Ubuntu 22.04, but it should work on other platforms where the `dpkg` program is present.

Signed-off-by: Meet Gandhi <meet.gandhi@einfochips.com>
  • Loading branch information
meetgandhi-dev committed Sep 20, 2024
1 parent a50614f commit c30dbbd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ if ("${CMAKE_SYSTEM}" MATCHES "Linux")
set(CPACK_GENERATOR "TBZ2")
find_program(DPKG_PROGRAM dpkg)
if (EXISTS ${DPKG_PROGRAM})
execute_process(COMMAND ${DPKG_PROGRAM} --print-architecture
OUTPUT_VARIABLE DPKG_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE "_" "-" DPKG_NAME "${PROJECT_NAME}")
set(CPACK_PACKAGE_FILE_NAME "${DPKG_NAME}_${YDLIDAR_SDK_VERSION}_${DPKG_ARCH}")
list (APPEND CPACK_GENERATOR "DEB")
endif()
else()
Expand Down

0 comments on commit c30dbbd

Please sign in to comment.