From 3a0c60d3bf8dab326e7dc409632a70ac63e358c1 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 27 Mar 2012 21:43:35 +0200 Subject: [PATCH] Override topdir from rpm command line seems necessary on Amazon linux. This modification should be harmless on other distro. Signed-off-by: Eric NOULARD --- Modules/CPackRPM.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 442d7c41d..cba746fc5 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -899,6 +899,7 @@ IF(RPMBUILD_EXECUTABLE) # Now call rpmbuild using the SPECFILE EXECUTE_PROCESS( COMMAND "${RPMBUILD_EXECUTABLE}" -bb + --define "_topdir ${CPACK_RPM_DIRECTORY}" --buildroot "${CPACK_RPM_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}" "${CPACK_RPM_BINARY_SPECFILE}" WORKING_DIRECTORY "${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}${CPACK_RPM_PACKAGE_COMPONENT_PART_PATH}"