-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix package generation * rename package to zenohc; prefix add lib prefix to deb packages; * fix package version * fix version for X.Y.Z.1
- Loading branch information
1 parent
fee0bf5
commit 4be991d
Showing
3 changed files
with
80 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
if(CPACK_GENERATOR MATCHES "DEB") | ||
# DEB package | ||
if(NOT DEBARCH) | ||
execute_process( | ||
COMMAND dpkg --print-architecture | ||
OUTPUT_VARIABLE DEBARCH | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
) | ||
endif() | ||
message(STATUS "Configure DEB packaging for Linux ${DEBARCH}") | ||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "ZettaScale Zenoh Team, <[email protected]>") | ||
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${DEBARCH}) | ||
set(CPACK_DEB_COMPONENT_INSTALL ON) | ||
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) | ||
set(CPACK_DEBIAN_LIB_PACKAGE_NAME lib${CPACK_PACKAGE_NAME}) | ||
set(CPACK_DEBIAN_LIB_PACKAGE_DEPENDS "libc6 (>=2.12)") | ||
set(CPACK_DEBIAN_DEV_PACKAGE_NAME lib${CPACK_PACKAGE_NAME}-dev) | ||
set(CPACK_DEBIAN_DEV_PACKAGE_DEPENDS "${CPACK_DEBIAN_LIB_PACKAGE_NAME} (=${CPACK_PACKAGE_VERSION})") | ||
endif() | ||
|
||
if(CPACK_GENERATOR MATCHES "RPM") | ||
# RPM package | ||
# rpmbuild should be installed | ||
# apt install rpm | ||
if(NOT RPMARCH) | ||
set(RPMARCH ${CMAKE_SYSTEM_PROCESSOR}) | ||
endif() | ||
message(STATUS "Configure RPM packaging for Linux ${RPMARCH}") | ||
set(CPACK_RPM_PACKAGE_ARCHITECTURE ${RPMARCH}) | ||
set(CPACK_RPM_COMPONENT_INSTALL ON) | ||
set(CPACK_RPM_FILE_NAME RPM-DEFAULT) | ||
set(CPACK_RPM_LIB_PACKAGE_NAME ${CPACK_PACKAGE_NAME}) # avoid "-lib" suffix for "lib" package | ||
set(CPACK_RPM_DEV_PACKAGE_REQUIRES "${CPACK_RPM_LIB_PACKAGE_NAME} = ${CPACK_PACKAGE_VERSION}") | ||
endif() |