|
|
@@ -139,6 +139,7 @@ if(CPackGen MATCHES "RPM")
|
|
|
set(CPACK_COMPONENT_HEADERS_DESCRIPTION
|
|
|
"C/C\\+\\+ header files for use with MyLib")
|
|
|
|
|
|
+ # test package info
|
|
|
if(${CPackComponentWay} STREQUAL "IgnoreGroup")
|
|
|
# set gnu install prefixes to what they are set during rpm creation
|
|
|
# CMAKE_SIZEOF_VOID_P is not set here but lib is prefix of lib64 so
|
|
|
@@ -213,6 +214,29 @@ if(CPackGen MATCHES "RPM")
|
|
|
message(FATAL_ERROR "error: '${check_file}' Architecture does not match expected value - '${check_file_match_expected_architecture}'; RPM output: '${check_file_content}'; generated spec file: '${spec_file_content}'")
|
|
|
endif()
|
|
|
endforeach()
|
|
|
- elseif(${CPackComponentWay} STREQUAL "IgnoreGroup")
|
|
|
+
|
|
|
+ # test package content
|
|
|
+ foreach(check_file ${expected_file})
|
|
|
+ string(REGEX MATCH ".*Unspecified.*" check_file_Unspecified_match ${check_file})
|
|
|
+
|
|
|
+ if(check_file_Unspecified_match)
|
|
|
+ execute_process(COMMAND ${RPM_EXECUTABLE} -pql ${check_file}
|
|
|
+ OUTPUT_VARIABLE check_file_content
|
|
|
+ ERROR_QUIET
|
|
|
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
+
|
|
|
+ string(REGEX MATCH ".*bin/@in@_@path@@with/@and/@/@in_path@/mylibapp2$" check_at_in_path ${check_file_content})
|
|
|
+
|
|
|
+ if(NOT check_at_in_path)
|
|
|
+ file(GLOB_RECURSE spec_file "${CPackComponentsForAll_BINARY_DIR}/*Unspecified*.spec")
|
|
|
+
|
|
|
+ if(spec_file)
|
|
|
+ file(READ ${spec_file} spec_file_content)
|
|
|
+ endif()
|
|
|
+
|
|
|
+ message(FATAL_ERROR "error: '${check_file}' rpm package path with @ characters is missing or invalid. RPM output: '${check_file_content}'; generated spec file: '${spec_file_content}'")
|
|
|
+ endif()
|
|
|
+ endif()
|
|
|
+ endforeach()
|
|
|
endif()
|
|
|
endif()
|