mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
cmake: enabled RPM packaging
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
parent
2314bc2f59
commit
a91f1e5095
@ -53,12 +53,13 @@ set (upm_VERSION_STRING ${upm_VERSION_MAJOR}.${upm_VERSION_MINOR}.${upm_VERSION_
|
|||||||
|
|
||||||
set (CMAKE_SWIG_FLAGS "")
|
set (CMAKE_SWIG_FLAGS "")
|
||||||
|
|
||||||
option (IPK "Generate IPK using CPack" OFF)
|
|
||||||
option (BUILDDOC "Build all doc." OFF)
|
option (BUILDDOC "Build all doc." OFF)
|
||||||
option (BUILDSWIG "Build swig modules." ON)
|
option (BUILDSWIG "Build swig modules." ON)
|
||||||
option (BUILDSWIGPYTHON "Build swig python modules." ON)
|
option (BUILDSWIGPYTHON "Build swig python modules." ON)
|
||||||
option (BUILDSWIGNODE "Build swig node modules." ON)
|
option (BUILDSWIGNODE "Build swig node modules." ON)
|
||||||
option (BUILDEXAMPLES "Build C++ example binaries" OFF)
|
option (BUILDEXAMPLES "Build C++ example binaries" OFF)
|
||||||
|
option (IPK "Generate IPK using CPack" OFF)
|
||||||
|
option (RPM "Generate RPM using CPack" OFF)
|
||||||
|
|
||||||
if (BUILDDOC)
|
if (BUILDDOC)
|
||||||
# add a target to generate API documentation with Doxygen
|
# add a target to generate API documentation with Doxygen
|
||||||
@ -147,6 +148,28 @@ if (IPK)
|
|||||||
include (CPack)
|
include (CPack)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (RPM)
|
||||||
|
message (INFO " - Enabled RPM packaging for ${DETECTED_ARCH}")
|
||||||
|
set(CPACK_PACKAGE_VERSION ${VERSION})
|
||||||
|
set(CPACK_GENERATOR "RPM")
|
||||||
|
set(CPACK_PACKAGE_NAME "libupm${upm_VERSION_MAJOR}")
|
||||||
|
set(CPACK_PACKAGE_RELEASE 1)
|
||||||
|
set(CPACK_PACKAGE_VERSION
|
||||||
|
"${upm_VERSION_MAJOR}.${upm_VERSION_MINOR}.${upm_VERSION_PATCH}${upm_PACKAGE_ON_TAG}${VERSION_COMMIT}")
|
||||||
|
set(CPACK_PACKAGE_CONTACT "Intel IoT-Devkit")
|
||||||
|
set(CPACK_PACKAGE_VENDOR "Intel IoT-Devkit")
|
||||||
|
set(CPACK_RPM_PACKAGE_REQUIRES "libmraa0 (>= ${MRAA_VERSION})")
|
||||||
|
set(CPACK_RPM_PACKAGE_PROVIDES "${CPACK_PACKAGE_NAME}-devel")
|
||||||
|
EXECUTE_PROCESS(COMMAND rpm --showrc
|
||||||
|
COMMAND grep -E "dist[[:space:]]*\\."
|
||||||
|
COMMAND sed -e "s/^.*dist\\s*\\.//"
|
||||||
|
COMMAND tr \\n \\t
|
||||||
|
COMMAND sed -e s/\\t//
|
||||||
|
OUTPUT_VARIABLE DIST_TAG)
|
||||||
|
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${DIST_TAG}.${DETECTED_ARCH}")
|
||||||
|
include(CPack)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory (src)
|
add_subdirectory (src)
|
||||||
|
|
||||||
if(BUILDEXAMPLES)
|
if(BUILDEXAMPLES)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user