patch from Dan Eicher, CPack/RPM working again
[blender-staging.git] / build_files / cmake / packaging.cmake
index ee07857db260552f56a83f3bb26d7bcf251d6b97..07c5add52b007f69daecd8cda45a20a00ff0cc1f 100644 (file)
@@ -31,17 +31,20 @@ set(BUILD_REV ${MY_WC_REVISION})
 
 
 # Force Package Name
-set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${BLENDER_VERSION}-r${BUILD_REV}-${CPACK_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
+set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${BLENDER_VERSION}-r${BUILD_REV}-${CMAKE_SYSTEM_PROCESSOR})
 
 if(CMAKE_SYSTEM_NAME MATCHES "Linux")
        # RPM packages
        include(build_files/cmake/RpmBuild.cmake)
        if(RPMBUILD_FOUND AND NOT WIN32)
                set(CPACK_GENERATOR "RPM")
-               set(CPACK_SET_DESTDIR TRUE)
+               set(CPACK_RPM_PACKAGE_RELEASE "r${BUILD_REV}")
+               set(CPACK_SET_DESTDIR "true")
                set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
+               set(CPACK_PACKAGE_RELOCATABLE "false")
                set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
                set(CPACK_RPM_PACKAGE_GROUP "Amusements/Graphics")
+               set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_SOURCE_DIR}/build_files/package_spec/rpm/blender.spec.in")
        endif()
 endif()